Sir... please give some important coding questions asked by product companies..
No Answer is Posted For this Question
Be the First to Post Answer
What is your nationality?
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
void ( * abc( int, void ( *def) () ) ) ();
abcdedcba abc cba ab ba a a
main() { extern out; printf("%d", out); } int out=100;
Write a procedure to implement highlight as a blinking operation
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
why is printf("%d %d %d",i++,--i,i--);
Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.