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
What do you mean by a sequential access file?
What are the applications of c language?
What does %c mean in c?
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
Can a program have two main functions?
What is the difference between local variable and global variable in c?
Write a code of a general series where the next element is the sum of last k terms.
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
How does selection sort work in c?
Does c have enums?
Is it better to use a macro or a function?
How many types of errors are there in c language? Explain
What is the difference between far and near in c?
What are the uses of null pointers?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)