What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;

Answers were Sorted based on User's Feedback



What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;..

Answer / manjunath a s

it will be in infinite loop because x=6 is an assignment
statement and it will be always true.

Is This Answer Correct ?    1 Yes 6 No

What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;..

Answer / vikraman85

compile time err wil occur..
Have 2 use == opr..

Is This Answer Correct ?    3 Yes 11 No

Post New Answer

More C Interview Questions

User define function contain thier own address or not.

2 Answers  


Describe the difference between = and == symbols in c programming?

0 Answers  


program to locate string with in a string with using strstr function

2 Answers   Huawei, Shreyas,


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

0 Answers  


What are the 3 types of structures?

0 Answers  






whitch value return void main?

11 Answers  


9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

1 Answers  


write a program to count the no of repaeted words in a line?

1 Answers  


How do you use a 'Local Block'?

0 Answers   Ericsson,


int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation.

15 Answers   Global Edge,


What is main return c?

0 Answers  


what is the syallabus of computer science students in group- 1?

0 Answers  


Categories