Operators
- Operation “n = n * m + n” can also be written as ___________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Operation “n = n * m + n” can also be written as "(p = n * m)!=(n = p + m);" or n = (m + 1)* n; and n *= m + 1;
- What will be the value of the following assignment expression?
(p = fun())!= 2 considering fun() returns 3
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
None of these
- What is the type of the following assignment expression if p is of type float and q is of type int?
q = p + q;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
int
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int p = 2, q = 1;
p &&= q;
printf("%d\n", p);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Compilation Error
main.c: In function ‘main’:
main.c:5:13: error: expected expression before ‘=’ token
p &&= q;
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int p = 4, q = 4;
p /= p / q;
printf("%d\n", p);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
4