int a=0,b=2;
if (a=0)
b=0;
else
b=*10;
What is the value of b ?

Answer Posted / kc

The code will not compile as statement "b=*10" is invalid"
It should be "b*=10".

If i assume "b*=10" then the output will be 20

Reason:
a=0;
b=2;
if(a=0 means 0) so b=0 will not execute
b=b*10=2=10=20;

Is This Answer Correct ?    37 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do pointers need to be initialized?

571


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

629


What is structure data type in c?

575


What is wrong with this program statement?

610


What does it mean when the linker says that _end is undefined?

638






How many types of errors are there in c language? Explain

577


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

562


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1895


how can use subset in c program and give more example

1507


code for replace tabs with equivalent number of blanks

1645


Tell me what is null pointer in c?

617


What is %lu in c?

691


What is equivalent to ++i+++j?

648


How do you construct an increment statement or decrement statement in C?

747


What is this pointer in c plus plus?

600