Question
What is the output of this C code?   int main()   {       float x = 'a';       printf("%f", x);       return 0;   }
Answer: Option D
Was this answer helpful ?
Since the ASCII value of a is 97, the same is assigned to the float variable and printed.
Output:
$ cc pgm8.c
$ a.out
97.000000
Was this answer helpful ?
More Questions on This Topic :
Question 3. %f access specifier is used for? ....
Question 7. Modulus for float could be achieved by? ....
Question 8. %lf is used to display? ....
Submit Solution