What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
Answer Posted / mahendra giri
y will be 7 because in the if condition we have assigned
value 6 on x not ==,so ans of
y =7
| Is This Answer Correct ? | 40 Yes | 2 No |
Post New Answer View All Answers
Can include files be nested? How many levels deep can include files be nested?
What do you know about the use of bit field?
What are structural members?
Stimulate calculator using Switch-case-default statement for two numbers
Why C language is a procedural language?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
What are the differences between new and malloc in C?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Explain how do you determine a file’s attributes?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
number of times a digit is present in a number
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
Write the test cases for checking a variable having value in range -10.0 to +10.0?
How do you define a string?