main(){
unsigned int i;
for(i=1;i>-2;i--)
printf("c aptitude");
}
Answers were Sorted based on User's Feedback
Answer / susie
Explanation:
i is an unsigned integer. It is compared with a signed
value. Since the both types doesn't match, signed is
promoted to unsigned value. The unsigned equivalent of -2 is
a huge value so condition becomes false and control comes
out of the loop.
Is This Answer Correct ? | 11 Yes | 2 No |
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
why java is platform independent?
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
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
main() { int i=5; printf("%d",++i++); }
How to read a directory in a C program?
main() { char a[4]="HELL"; printf("%s",a); }