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...


main()
{
intx=2,y=6,z=6;
x=y=z;
printf(%d",x)
}

Answers were Sorted based on User's Feedback



main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }..

Answer / sorab

error becoz in program written as printf(%d",x)
actually it written like that printf("%d",x);
then the value 6 is print on screen

thanks ....

Is This Answer Correct ?    36 Yes 7 No

main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }..

Answer / krs

"intx=2" must be "int x=2".This is First error.
secondly there is a syntax error in printf();
So there is compile time error due to this code execution.

Is This Answer Correct ?    14 Yes 1 No

main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }..

Answer / dhananjay

x=6 beacuse x will contain the latest value.

Is This Answer Correct ?    21 Yes 14 No

main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }..

Answer / nithya

output:

undefined symbol 'intx'
undefined symbol 'y'
undefined symbol 'z'
syntax error 'printf(%d",x)'

the above code will be change

main()
{
int x=2,y=6,z=6;
x=y=z;
printf("%d",x);
}

output:

warning error:y assign value not used

6

Is This Answer Correct ?    5 Yes 0 No

main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }..

Answer / kdedman.kan

x=6 , because its the latest value.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More C Interview Questions

Are the outer parentheses in return statements really optional?

0 Answers  


create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.

4 Answers  


How can I ensure that integer arithmetic doesnt overflow?

0 Answers  


How can I read a directory in a C program?

2 Answers   Bright Outdoor, Wipro,


how can write all 1to 100 prime numbers using for loop,if and break ?

2 Answers   TCS,


write a program which counts a product of array elements lower than 10.

1 Answers  


# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }

5 Answers  


Explain the term printf() and scanf() used in c language?

0 Answers  


i want to have a program to read a string and print the frequency of each character and it should work in turbo c

3 Answers   Persistent, Wipro,


write the program for prime numbers?

73 Answers   Accenture, Aptech, Infosys, TCS,


for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }

1 Answers  


What would be an example of a structure analogous to structure c?

0 Answers  


Categories