void main()
{
static int i=5;
if(--i){
main();
printf("%d ",i);
}
}
Answer / susie
Answer :
0 0 0 0
Explanation:
The variable "I" is declared as static, hence memory for I
will be allocated for only once, as it encounters the
statement. The function main() will be called recursively
unless I becomes equal to 0, and since main() is recursively
called, so the value of static I ie., 0 will be printed
every time the control is returned.
Is This Answer Correct ? | 4 Yes | 5 No |
main() { 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() { static int var = 5; printf("%d ",var--); if(var) main(); }
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }
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() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
What are segment and offset addresses?
void pascal f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } void cdecl f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }
why the range of an unsigned integer is double almost than the signed integer.