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
What is the difference between union and structure in c?
What are control structures? What are the different types?
How is a macro different from a function?
What is an lvalue in c?
What are the rules for identifiers in c?
What is the Purpose of 'extern' keyword in a function declaration?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is the value of c?
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
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
what are the advantages of a macro over a function?
How do you override a defined macro?
Explain how do you print an address?
Can a pointer point to null?
How can I implement a delay, or time a users response, with sub-second resolution?