what wud be the output?

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=Manish Kumar Choudhary
string2=(null)
string3=(null)

d)Compiler error





Answer Posted / b subrahmanyam

What does the current output look like this ans is c)

string1=MANISH KUMAR CHOUDHARY
string2=null
string3=null

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between union and structure in c?

576


What are control structures? What are the different types?

597


How is a macro different from a function?

654


What is an lvalue in c?

694


What are the rules for identifiers in c?

585






What is the Purpose of 'extern' keyword in a function declaration?

654


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

623


What is the value of c?

569


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

1466


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2235


what are the advantages of a macro over a function?

645


How do you override a defined macro?

699


Explain how do you print an address?

659


Can a pointer point to null?

586


How can I implement a delay, or time a users response, with sub-second resolution?

624