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

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

What are the types of arrays in c?

1089


I have a varargs function which accepts a float parameter?

994


What is clrscr in c?

1069


Why does notstrcat(string, "!");Work?

1079


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

1931


can we change the default calling convention in c if yes than how.........?

2466


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1891


shorting algorithmS

2192


What functions are used for dynamic memory allocation in c language?

1074


Can we use visual studio for c?

1004


Are the variables argc and argv are always local to main?

968


Is main is a keyword in c?

1066


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1044


What do you mean by dynamic memory allocation in c?

1044


What is the method to save data in stack data structure type?

1032