Download COBOL editor

Here is COBOL editor to perform COBOL programs.

COBOL stands for Common Business Oriented Language.COBOL was designed in 1959, by the Conference on Data Systems Languages (CODASYL) and was partly based on previous programming language design work by Grace Hopper, commonly referred to as "the (grand)mother of COBOL.
Here we provide you a COBOL editor where you can create and run your COBOL programs.

      Download Link


It also contains some predefined examples.
Previous
Next Post »

4 comments

Write comments
Akshay
AUTHOR
27 September 2012 at 12:39 delete

Practical 5

/* Write program to fetch IP address of host machine */

#include
#include
#include
#include
#include
#include
#include
#include

int main(int argc, char *argv[])
{
struct hostent *h;
if(argc != 2)
{
fprintf(stderr, "Usage: %s \n", argv[0]);
exit(1);
}
if((h=gethostbyname(argv[1]))==NULL)
{
herror("gethostbyname():");
exit(1);
}
else
printf("gethostbyname() is OK. \n");

printf("The host name is: %s \n", h->h_name);

printf("The IP address is: %s\n", inet_ntoa(*((struct in_addr *) h->h_addr)));

printf("The address length is: %d\n", h->h_length);

printf("Sniffing other names....sniff....sniff....sniff....\n");

int j = 0;
do
{
printf(" An alias #%d is: %s\n", j, h->h_aliases[j]);
j++;
}

while(h->h_aliases[j] != NULL);
printf("Sniffing other IPs....sniff....sniff....sniff....\n");

int i=0;
do
{
printf(" Address #%i is: %s\n", i, inet_ntoa(*((struct in_addr *) (h->h_addr_list[i] ))));
i++;
}

while(h->h_addr_list[i] != NULL);
return 0;
}

Reply
avatar
Anonymous
AUTHOR
27 September 2012 at 12:42 delete

Practical 6

/* Program for Client Machine */
#include
#include"/usr/include/linux/inet.h"
#include"/usr/include/isc/socket.h"
#define SERV_TCP_PORT 9001
#define SERV_HOST_ADDR "10.0.1.106"

main()
{
int i,sockfd;

char *line;

struct sockaddr_in serv_addr;

bzero((char *) &serv_addr, sizeof(serv_addr));

serv_addr.sin_family = AF_INET;

serv_addr.sin_addr.s_addr = inet_addr(SERV_HOST_ADDR);


serv_addr.sin_port = htons(SERV_TCP_PORT);

printf(".........Creating Socket.........\n");

sockfd = socket(AF_INET, SOCK_STREAM, 0);

printf(".........Socket Created.........\n");

if(i = connect(sockfd,(struct sockaddr *) &serv_addr, sizeof(serv_addr))<0)
printf(".....Unable to Connect........\n");

printf(".........Connected to the server = %d..........",i);

read(sockfd, line,1);

printf("character = %c", *line);
}

Reply
avatar
Anonymous
AUTHOR
27 September 2012 at 12:48 delete

#include-/usr/include/sys/types.h-
#include-/usr/include/netinet/in.h-
#include-/usr/include/arpa/inet.h-
#include-/usr/include/sys/socket.h-
#include-stdio.h-

Reply
avatar
Anonymous
AUTHOR
1 October 2012 at 00:56 delete

http://www.cse.unsw.edu.au/~billw/aidict.html#backwardchaining

Reply
avatar