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 |
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
main() { extern int i; i=20; printf("%d",i); }
how to check whether a linked list is circular.
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
main() { extern int i; i=20; printf("%d",sizeof(i)); }
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }