What is the output of the following code?

void main()
{
char str =`Z`;
printf("\n%c",str);
}

Options
- 26
- Error
- Z
- None of the above


CORRECT ANSWER : Z

Discussion Board
Correct answer is "Error"

in the program Z is enclosed by `` symbol not by single quote '''' so it will throw an error


Shilpa s gowda 08-31-2018 04:22 AM

Explain

Its a Simple program. If the above printf statement would have been like printf("\n %d",str); then the output will be 90 ! ASCII value of 'Z'

Sivaprakash G 07-16-2014 12:37 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement