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

how to find binary of number?

3655


Is that possible to add pointers to each other?

996


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

863


What is LINKED LIST? How can you access the last element in a linked list?

713


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

735






What is bubble sort technique in c?

662


What is a constant and types of constants in c?

695


When should structures be passed by values or by references?

673


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

725


Explain how do you declare an array that will hold more than 64kb of data?

1024


What do you mean by recursion in c?

724


what are bit fields? What is the use of bit fields in a structure declaration?

1600


Explain how do you print an address?

777


What is difference between scanf and gets?

707


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1406