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
What are the types of arrays in c?
I have a varargs function which accepts a float parameter?
What is clrscr in c?
Why does notstrcat(string, "!");Work?
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.
can we change the default calling convention in c if yes than how.........?
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.
shorting algorithmS
What functions are used for dynamic memory allocation in c language?
Can we use visual studio for c?
Are the variables argc and argv are always local to main?
Is main is a keyword in c?
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)
What do you mean by dynamic memory allocation in c?
What is the method to save data in stack data structure type?