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 / ankush

The answer seems like....
string1=MANISHKUMARCHAUDHARY
string2=(null)
string3=
And curser is blinking after the last line....





ankushtyagi2008@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

Is c language still used?

530


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2445


Is c still used?

592


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

634


What is ponter?

763






Can the “if” function be used in comparing strings?

580


what type of questions arrive in interview over c programming?

1545


What is the need of structure in c?

558


Is fortran still used today?

595


What is #define used for in c?

607


How can I manipulate strings of multibyte characters?

631


What are the different types of data structures in c?

593


Explain how do you determine whether to use a stream function or a low-level function?

616


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1506


What is strcpy() function?

650