Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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





Answers were Sorted based on User's Feedback



what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / rakesh soni

c)string1=Manish Kumar Choudhary
string2=(null)
string3=(null)

Bcoz, at the time of initialization, we are giving "mainsh"
"kumar" "choudhary", which is not comma seprated. so "Manish
kumar choudhary" string goes on to 0 position of the array
of char pointer. rest of 2 string have null.

Is This Answer Correct ?    11 Yes 1 No

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

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

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / ramlal bishnoi

d) compiler error

Is This Answer Correct ?    6 Yes 1 No

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / guruprasad

Compiler Error= Initializer Syntax Error in function main();

Is This Answer Correct ?    1 Yes 0 No

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

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

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

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

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / shashi singh

compiler error

Is This Answer Correct ?    0 Yes 0 No

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / ravi

answer a

Is This Answer Correct ?    0 Yes 0 No

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CH..

Answer / niranjan kumar niraj

d)Compile error

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Interview Questions

True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 Answers  


How can you call a function, given its name as a string?

0 Answers  


Explain what are the __date__ and __time__ preprocessor commands?

0 Answers  


Can a variable be both static and volatile in c?

0 Answers  


What are the advantages of using macro in c language?

0 Answers  


Write a program of prime number using recursion.

0 Answers   Aspiring Minds,


write an interactive program to generate the divisors of a given integer.

7 Answers   TCS,


write a c program to store and print name,address,roll.no of a student using structures?

7 Answers  


Define function ?Explain about arguments?

2 Answers   Geometric Software, Infosys,


What are the different types of control structures?

0 Answers  


C language questions for civil engineering

0 Answers   Tech Mahindra,


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

0 Answers  


Categories