Font size
WorksheetsOperators in C(29/08)
Total questions: 10
Worksheet time: 5mins
Which of the following operator takes only integer operands?
+
-
*
%
In an expression involving || operator, evaluation
I. Will be stopped if one of its components evaluates to false
II. Will be stopped if one of its components evaluates to true
III. Takes place from right to left
IV. Takes place from left to right
I and II
I and III
II and III
II and IV
#include <stdio.h>
int main() {
int age=20;
age>=18? printf("eligible") : printf("not eligible");
return 0; }
eligible
not elgible
#include <stdio.h>
int main() {
int y = 2;
int z = y +(y = 10);
printf("%d\n", z);
}
12
20
Either 12 or 20
4
void main()
{
int a, b = 2, c;
a = 2 * (b++);
c = 2 * (++b);
}
a = 4, c = 8
a = 3, c = 8
b = 3, c = 6
a = 4, c = 6
int a=10;
float b=10.5;
char n[10]="ECEB";
printf("a=---------,b=--------,n=------",a,b,n);
(a)
char name[10];
float m1;
printf("Enter the name and cutoff of yours");
scanf("---------",name,&m1);
%s%f
%c%f
%s%lf
int a;
flloat b;
char n[10];
printf("Enter a,b n values");
scanf("%d%f%s",----------);
&a,&b,&n
&b,&a,&n
&a,&b,n
a,b,n
4<<2
16
8
16>>2
4
8
32
64
