ipl-logo

Nt1310 Unit 6 Segression Analysis

164 Words1 Pages
#include #include #include #include #include #include #define MAX_SEQUENCE 10 typedef struct{ int *fib[MAX_SEQUENCE]; int sequence_size; } shared_data; int main(int argc,char *argv[]){ int number,shmid; key_t key; shared_data *segptr; pid_t pid; if(argc != 2){ printf(" Please Enter Command line argument "); exit(0); } number = atoi(argv[1]); if((number < 0) || (number > MAX_SEQUENCE)){ printf(" Please Enter numaric value between 0-10 "); exit(1); } else{ key = ftok(".", 'a '); if((shmid = shmget(key,sizeof(shared_data), IPC_CREAT|IPC_EXCL|0666)) == -1){ printf(" Shared memory segment exists ");

More about Nt1310 Unit 6 Segression Analysis

Open Document