Question:What would be printed on the standard output as a result of the following code snippet?
main( )
{
char *str[ ] = {
"Manish"
"Kumar"
"Choudhary"
};
printf ( "\nstring1 = %s", str[0] );
printf ( "\nstring2 = %s", str[1] );
printf ( "\nstring3 = %s", str[2] );
}
 

A string1 = Manish string2 = Kumar string3 = Choudhary 

B string1 = Manish string2 = Manish string3 = Manish 

C string1 = ManishKumarChoudhary string2 = (null) string3 = (null) 

D You will get an error message from the compiler 

E Compiler error 

+ Answer
+ Report
Total Preview: 521

Copyright © 2024. Powered by Intellect Software Ltd