main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output?

Answer Posted / vikesh

the answer will be India
if statement executes the statement if it is true i.e other
than "0"..[eg.if(1)]
here we are giving a=0 which implies false.
so the if statement doesnot execute first statement.
if you dont agree check following
main()
{
int a=0;
if(a=1)/*other than zero any number*/
printf("Ramco Systems\n")
printf("India\n");}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you assign a different address to an array tag?

710


Explain what is the heap?

635


What are disadvantages of C language.

662


What is spaghetti programming?

685


How are portions of a program disabled in demo versions?

765






how to introdu5ce my self in serco

1537


Is main is a keyword in c?

624


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1793


What are dangling pointers? How are dangling pointers different from memory leaks?

644


What is the g value paradox?

660


explain what are pointers?

633


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

670


In c programming language, how many parameters can be passed to a function ?

645


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2345


List some of the dynamic data structures in C?

804