![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of the alternativesa.return(sqr(a));b.printf("sqr(a)");c.return(a*a*a);d.printf("%d",sqr(a)); D Which of the following is not an infinite loop ?a.while(1){....}b.for(;;){...}c.x=0;do{/*x unaltered Which of the following is not an infinite loop ?a.while(1){....}b.for(;;){...}c.x=0;do{/*x unaltered within the loop*/...}while(x==0);d.# define TRUE 0while(TRUE){....} D What does the following function print?func(int i){if(i%2)return 0;eale return 1;}main(){int =3;i=func(i);i=func(i);printf("%d",i);}a.3b.1c.0d.2 C A memory of 20 bytes is allocated to a string declared as char *sthen the following two statements are executed:s="Etrance"l=strlen(s);what is the value of l ?a.20b.8c.9d.21 C Consider the following structure:struct num nam{int no;char name[25];};struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};..........printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);What does the above statement print?a.8,9b.9,9c.8,8d.8,unpredictable value C A Latest Answer : answer is 5 times ... What is incorrect among teh followingA recursive functiiona.calls itselfb.is equivalent to a loopc.has a termination condd.does not have a return value at all B # define prod(a,b)=a*bmain(){int x=2;int y=3;printf("%d",prod(x+2,y-10)); }the output of the program is a.8b.6c.7d.none A Find the output of the following programmain(){int x=5, *p;p=&x;printf("%d",++*p);}a.5b.6c.0d.none B Write one statement equivalent to the following two statements: x=sqrA.; return(x);Choose from one of the alternativesA. return(sqrA)B. printf("sqrA.")C. return(a*a*a)D. printf("%d",sqrA.)
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||