RCS FILE OF THE HEADER.H OF THE CHARACTER DRIVER RCS file: header.h,v Working file: header.h head: 1.10 branch: locks: strict root: 1.10 access list: symbolic names: keyword substitution: kv total revisions: 10; selected revisions: 10 description: This is the header … Continue reading
IPC Using SOCKETS AF_INET RCS file: server.c,v Working file: server.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Server implementaton using TCP , AF_INET. >> Calls used : socket(), … Continue reading
IPC Using SOCKETS AF_UNIX RCS file: server.c,v Working file: server.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Server implementaton using TCP , AF_UNIX. >> Calls used : socket(), … Continue reading
IPC USING MESSAGE QUEUES RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: included stdio.h, sys/msg.h, stdlib.h, sys/types.h, unistd.h, sys/ipc.h. —————————- revision 1.1 date: … Continue reading
HEADER FILE *************************************************************** RCS file: ./header.h,v Working file: ./header.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Included “stdio.h” , “stdlib.h”, “unistd.h”, “linux/sem.h”, “fcntl.h”, and “signal.h”. Declaration of the … Continue reading
INTER PROCESS COMMUNICATION USING PIPES. RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Included stdio.h. and fcntl.h. ,sys/types.h, stdlib.h, unistd.h. —————————- revision 1.1 … Continue reading
HEADER *************************************************************** #include<stdio.h> #include<stdlib.h> struct cq { int info; struct cq *next; }; int getchoice(); int operation(int, struct cq **, struct cq **, struct cq **); int enqueue( struct cq **, struct cq **, struct cq **); int display( struct … Continue reading
int fix_cnode(struct node **start, struct node **start1) { struct node *temp,**ma,*temp1; int count = 0,i,flag =1; temp = *start; ma = calloc(sizeof(struct node *),20); while(1) { flag = 1; if(!(temp->next)) { printf(“there is no loop\n”); goto o; } for(i=0; i<count; … Continue reading
int fix_loop(struct node **start)// pass start as a pass by reference argument { struct node *temp,**ma; int count = 0,i; temp = *start; ma = calloc(sizeof(struct node *),20); while(1) { if(!(temp->next)) { printf(“there is no loop\n”); return -1; } for(i=0; … Continue reading
#include<stdio.h> #include<math.h> int main() { double a,b,i; int j; int count=0; a=22.0/7.0; for(i=0.0; i <= 4.0; i+=0.1) { b= sin(a*i)+ cos(a*i); if(b >= 0) { printf(” “); for(j =10*b;j >= 0.0; j-=1.0) { printf(” “); } } if(b < 0.0) … Continue reading
#include<stdio.h> #include<fcntl.h> #include<dirent.h> #include<string.h> int openf(char *); int main() { DIR *i; struct dirent *k; int j,l,s,flag=1,fd,fd1; char *m = “txt.”; char ch; fd1 = openf(“new.txt”); i = opendir(“./test”); printf(“\n%d\n”,i); while(( k = readdir(i)) != NULL) { flag=1; l=strlen(k->d_name); for(j … Continue reading
#include<stdio.h> #include<fcntl.h> #include<stdlib.h> int foo(int , char *, int , int , int, char *); int openf( char *); int main(int argc, char * argv[]) { int fd,pos,skip,b_size,n; char ch,*buff; buff = (char*)malloc(sizeof(char)); printf(“\nBlock size: “); scanf(“%d”,&b_size); printf(“\nNumber of Blocks: … Continue reading
#include<stdio.h> #include<fcntl.h> int openf(char *); int main(int argc, char * argv[]) { int fd,fd1, pos,i=1000000; char ch=”; fd = openf(argv[1]); pos = lseek(fd,i * 4096, SEEK_SET); write(fd, &ch,1); close(fd); } int openf(char * s) { int fd; fd = open(s,O_RDWR|O_CREAT,0666); … Continue reading
#include<stdio.h> #include<fcntl.h> int openf(char *); int main(int argc, char * argv[]) { int fd,fd1, pos,i=3; char ch; fd = openf(argv[1]); fd1 = openf(argv[2]); pos = lseek(fd, 0, SEEK_END); printf(“\n%d\n”,pos); for(i=2; i < pos+1;i++) { lseek(fd, pos-i, SEEK_SET); read(fd, &ch, 1); … Continue reading
header file********************************************************************* #include<stdio.h> #include<stdlib.h> struct distance { int feet; int inches; }; int display(struct distance *,struct distance *,struct distance *); struct distance * add(struct distance *,struct distance *); struct distance * input(); ************************************************************************** main file****************************************************************** #include”header.h” int main() { struct … Continue reading