main()
{
char x;
while(x=0;x<=255;x++)
printf("\nAscii value %d Charater %c",x,x);
}

Answers were Sorted based on User's Feedback



main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); ..

Answer / ashutosh tiwari

syntax error: while will never have initialization or
increment. it only have condition.

Is This Answer Correct ?    22 Yes 1 No

main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); ..

Answer / abdulhamid

21

Is This Answer Correct ?    3 Yes 16 No

Post New Answer

More C Interview Questions

int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

15 Answers   Mascot,


what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....

1 Answers   TCS,


What is auto keyword in c?

1 Answers  


What is a memory leak? How to avoid it?

2 Answers  


what is void pointer?

1 Answers   Wipro,


What does the c in ctime mean?

1 Answers  


Write a program of prime number using recursion.

1 Answers   Aspiring Minds,


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1 Answers   Wilco,


print the palindrome numbers in between 0 to n

1 Answers  


who will call your main function in c under linux?

2 Answers  


Write a program to print ASCII code for a given digit.

1 Answers   EXL, HCL,


Write an interactive c program that will encode or decode a line of text. To encode a line of text, proceed as follows: Convert each character, including blank spaces, to its ASCII equivalent. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above exceeds N2, then subtract the largest possible multiple of N2 from this number, and add the remainder to N1. Hence the encoded number will always fall between N1 and N2, and will therefore always represent some ASCII character. Display the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding.

1 Answers   Amazon, CSJM, HCL, Microsoft, TCS, Wipro,


Categories