void main()
{
while(1){
if(printf("%d",printf("%d")))
break;
else
continue;
}
}
Answer / susie
Answer :
Garbage values
Explanation:
The inner printf executes first to print some garbage value.
The printf returns no of characters printed and this value
also cannot be predicted. Still the outer printf prints
something and so returns a non-zero value. So it encounters
the break statement and comes out of the while statement.
Is This Answer Correct ? | 21 Yes | 3 No |
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
why nlogn is the lower limit of any sort algorithm?
main() { int i=5; printf(ā%dā,i=++i ==6); }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
main() { printf("%x",-1<<4); }