main(){

unsigned int i;

for(i=1;i>-2;i--)

printf("c aptitude");

}

Answers were Sorted based on User's Feedback



main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitud..

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

main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitud..

Answer / maroti kukade

No output

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

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']

0 Answers  


Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?

2 Answers  


main() { int i=5; printf("%d",++i++); }

1 Answers  


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

0 Answers   Honeywell,


#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }

2 Answers  






main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,


main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!

1 Answers  


#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }

1 Answers  


Is the following code legal? struct a { int x; struct a b; }

1 Answers  


Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30

1 Answers   GoDB,


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)

1 Answers  


Categories