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 / vijay r15

ans is c
But 1printing mistake in s1 all characters should be in caps

Any dbt mail to raj.vijay55@gmail.com

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by a sequential access file?

621


What are the applications of c language?

616


What does %c mean in c?

641


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5051


Can a program have two main functions?

564






What is the difference between local variable and global variable in c?

677


Write a code of a general series where the next element is the sum of last k terms.

582


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

3641


How does selection sort work in c?

611


Does c have enums?

592


Is it better to use a macro or a function?

645


How many types of errors are there in c language? Explain

560


What is the difference between far and near in c?

589


What are the uses of null pointers?

588


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

1616