C Programming String Multiple choice question

Exercise :: String - General Questions

This section contains a lot of Question with answer and explanation.

1) What would be the output of the following C programs ?
                                                  

#include <stdio.h> #define PRODUCT(x) ( x * x ) void main( ) { char c[2] = "B" ; printf ( "%c", c[0] ) ; printf ( "%s", c ) ; }

A. BB
B. B
C. Garbage B
D. Compilation Error

Answer:

BB

Option:

( A )


Explanation :

No explanations available for this question.