Result of the following program is main() { int i=0; for(i=0;i<20;i++) { switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf("%d,",i); } } a)0,5,9,13,17 b)5,9,13,17 c)12,17,22 d)16,21 e)syntax error
8 30528What is the result main() { char c=-64; int i=-32 unsigned int u =-16; if(c>i){ printf("pass1,"); if(c
9 21223what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1
1 8555In the following code segment what will be the result of the function, value of x , value of y { unsigned int x=-1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); } a) same, MAXINT, -1 b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1 d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT
1 8030what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these
2 11661What will be result of the following program? void myalloc(char *x, int n) { x= (char *)malloc(n*sizeof(char)); memset(x,\0,n*sizeof(char)); } main() { char *g="String"; myalloc(g,20); strcpy(g,"Oldstring"); printf("The string is %s",g); } a) The string is : String b) Run time error/Core dump c) The string is : Oldstring d) Syntax error during compilation e) None of these
3 9074What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation
10 15115When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
1 5649Post New IBM C Interview Questions
Tell me what are the steps for creating basic or vertical forms?
How do you evaluate the impact of model updates on downstream applications?
Explain data types in scala?
I have a drawing of a wound rotor induction motor for a crane. This crane motor has 5 forward speeds & 5 reverse speed implemented of course with different amount of resistance for each speed setting selected. What has got me scratching around is the fact that 8 of the 10 speed selections switch in uneven (unbalanced) amounts of resistances on each of the 3 connections to the motor's rotor.Can this be possible? I would have assumed this would produce unbalanced rotor currents and therefore vibration in the motor. I would greatly appreciate anyone's comments on this. Many thanks, Confused.
How can a user find "commit work" statement in the pm orders (t-code iw32)?
Expand-------SNAT
What is kn measurement?
What is the difference between odbc, ole db & jdbc?
How to convert a string to lowercase in php?
What is actionmapping?
How do I open aspx files?
What is
The permanent reduction provided by the final drive in heavy vehicle is a) 4:1 b) 6:1 c) 8:1 d) 10:1
Explain about size of a molecule, which makes a substance antigenic?
What is the difference between set and unordered_set?