int a=0,b=2;
if (a=0)
b=0;
else
b=*10;
What is the value of b ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / akash
The value of b will be 20.
Because when a=0 is presented in if condition, it will take it as false condition. So the else block will execute.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / kishore sharma
a=0;
b=2;
but
condition
if(a=0)(b=0)
so
b=*10;
answer is
b=b*10 (b=0)
b=0*10;
0
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / sandeep kumar
if (a=0)
is a wrong statement.
Since it should be
if (a==0)
so, it will throw an error
Is This Answer Correct ? | 0 Yes | 1 No |
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]
Reverse a string word by word??
while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.
pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used.
What is the use of f in c?
How will you divide two numbers in a MACRO?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What are data types in c language?
mplementation of stack using any programing language
What is the significance of an algorithm to C programming?
Differentiate Source Codes from Object Codes
What is 02d in c?