double and chars
floats and doubles
ints and floats
ints and chars
D. ints and chars
void main()
{
int a;
int &b = a;
a=100;
printf("b=%d\ta=%d
", b,a);
}
b=100 a=100
b=100 a=0
b=0 a=100
Error
\a
\b
\m
main()
{
int a[10], i;
for (i = 1; I <= 0; i++)
{
scanf("%d", a[i]);
printf("%d", a[i]);
}
}
10
Logical error
Runtime error
1 to 10 will be displayed
main()
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}
200
500
30
Unpredictable
True
False
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000
True
False
Sequential
Random
Sequential and Random
None of the above
True
False
enumeration
iteration
culmination
pass through
What will be output if you will compile and execute the following c code?
#include
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}
27
343
233
Compiler Error
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
True
False
True
False
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
Hello
World
Compilation error
Hello World
True
False
True
False
High Level and Procedural
Low Level and OOPS
Middle Level and Procedural
Machine Level and OOPS
while (1)
{i++;}
for( ; ; );
while (true)
{false = 1;}
do
{y = x;}
while (x==0);
void main()
{
int a = 0;
while (a<=50) for(;;) if(++a % 50==0) break;
printf("a = %d", a);
}
a = 100
a = 50
compilation error
runtime error
An array is a collection of variables that are of the dissimilar data type.
An array is a collection of variables that are of the same data type.
An array is not a collection of variables that are of the same data type.
None of the above.
True
False
const X* const
X* const
X*
X&
True
False
4
7
6
0
0
NULL
1
none of the above
True
False
True
False
abstract
Virtual
Dynamic
Typeid