Tag Archives: c basic
c programming “printf format specification”
printf format specification: %[flag][width][.precision][modifier]<type> meaning of fields with e.g.,: format output 1. flag: printf(“%7s”,”hello”); spacespacehello 2. width: prinf(“%4d”,10); spacespace10 3. precision: (“%.2f”,1.1412); 1.41 4. modifier: h interpreted as short used with i,d,o,u,x l interpreted as long used with i,d,o,u,x L interpreted as … Continue reading
linklidt and scull
problem is while traversing it gives the segmentation fault. #include<stdio.h> #include<unistd.h> #include<stdlib.h> struct linklist{ char **data; struct linklist *next; }*start,*temp,*last; int main() { int i,j,m,l; int quantams; char y; start=(struct linklist*)malloc(sizeof(struct linklist)); temp=(struct linklist*)malloc(sizeof(struct linklist)); //last->data=malloc(sizeof(char*)*); //printf(“enter the dat in … Continue reading