main()
{
int x=5;
clrscr();
for(;x<= 0;x--)
{
printf("x=%d ", x--);
}
}
a. 5, 3, 1
b. 5, 2, 1,
c. 5, 3, 1, -1, 3
d. â3, -1, 1, 3, 5
Answers were Sorted based on User's Feedback
Answer / purushotam111
Just change the operator in for >= instead of <=
then our answer is 5 , 3 , 1
Is This Answer Correct ? | 16 Yes | 2 No |
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
main() { 41printf("%p",main); }8
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }
Write a C program to print âCampus Force trainingâ without using even a single semicolon in the program.
main ( ) { static char *s[ ] = {âblackâ, âwhiteâ, âyellowâ, âvioletâ}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(â%sâ,*--*++p + 3); }
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(â%dâ,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(â%dâ,*cptr); }
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,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); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }