![]() |
| 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 Main must be written asa.the first function in the programb.Second function in the programc.Last function in the programd.any where in the program C 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 Consider the following programmain(){int a[5]={1,3,6,7,0};int *b;b=&a[2];}the value of b[-1] isa.1b.3c.-6d. none 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 Consider the following program sigmentint n,sum=1;switch(n) {case 2:sum=sum+2;case 3:sum*=2;break;default:sum=0;} if n=2, what is the value of suma.0b.6c.3d.none B Find the output of the following programmain(){int x=5, *p;p=&x;printf("%d",++*p);}a.5b.6c.0d.none B Consider the following C codemain(){int i=3,x;while(i>0){x=func(i);i--;}int func(int n){static sum=0;sum=sum+n;return(sum);}the final value of x isa.6b.8c.1d.3 A Main must be written asA. The first function in the programB. Second function in the programC. Last function in the programD. Any where in the program What does the following function print?func(int i){if(i%2)return 0;else return 1;}main(){int =3;i=func(i);i=func(i);printf("%d",i);}A. 3B. 1C. 0D. 2 Consider the following programmain(){unsigned int i=10;while(i>=0) { printf("%u",i) i--; }}How many times the loop will get executedA.10B.9C.11D. infinite
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||