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
How do I round numbers?
What is difference between structure and union?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What are the types of arrays in c?
Define Spanning-Tree Protocol (STP)
What is a good data structure to use for storing lines of text?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
How does #define work?
Why is c so popular?
Explain how do you print an address?
how should functions be apportioned among source files?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What's a good way to check for "close enough" floating-point equality?
#include
What is the auto keyword good for?