delete
concatenate
compare
none of the above
B. concatenate
?,-
?,:
++<--
none of the above
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
#define sqr(x= x*x)
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}
77, 121
225, 121
77< 144
Compilation error
for
while
do-while
while & do-while
True
False
253
254
255
256
the increment should always be ++k
the variable must always be the letter i when using a for loop
there should be a semicolon at the end of the statement
the commas should be semicolons
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
True
False
True
False
An Editor
A compiler
An operating system
None of the above
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
True
False
#include
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}
Less than
Equal
Greater than
None of above
main()
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}
Infinite loop
Hello World
World Hello
Compilation error
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
Type definitions (typedefs)
Class definitions
Function definitions
Template definitions
True
False
do-while
if-else
goto
for
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
True
False
True
False
4
2
8
10
True
False
True
False
.
?
;
none of the above
True
False
True
False
True
False
Throw by value and catch by reference.
Throw by reference and catch by reference.
Throw by value and catch by value
Throw the pointer value and provide catch for teh pointer type.