What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
Answer Posted / piyush
its looks logically incorrect,but in c anc c++ if any such
incident occurs like if(x=6), this condition is always
treated as true
will give a warning ,but will execute this as considering
the if condition as true
ANSWER to this question is y=7
Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
explain what is a newline escape sequence?
Why header files are used?
Is a house a shell structure?
What will be your course of action for a push operation?
What is the use of extern in c?
Is c easy to learn?
Explain what is the benefit of using an enum rather than a #define constant?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
List some of the dynamic data structures in C?
Explain b+ tree?
Why do we write return 0 in c?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is extern variable in c with example?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"