True
False
B. False
the question mark should be an equal sign
the first semicolon should be a colon
there are too many variables in the statement
the conditional operator is only used with apstrings
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
int ~Country()
void Country()
int ~Country(Country obj)
void ~Country()
True
False
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
double and chars
floats and doubles
ints and floats
ints and chars
x + y' is a keyword
3 and 20 are constants
3z is a constant
y is a variable and z is a constant
void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
Hello
World
Compilation error
Hello World
Keywords have some predefine meanings and these meanings can be changed.
Keywords have some unknown meanings and these meanings cannot be changed.
Keywords have some predefine meanings and these meanings cannot be changed.
None of the above
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
True
False
True
False
True
False
printf("%d%d", book.price, book.page);
printf("%d%d", price.book, page.book);
printf("%d%d"< price::book< page::book);
printf("%d%d", price>book, page>book);
3
4
5
infinite
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
True
False
int num[6] = { 2, 4, 12, 5, 45, 5 } ;
int n{} = { 2, 4, 12, 5, 45, 5 } ;
int n{6} = { 2< 4< 12 } ;
int n(6) = { 2, 4, 12, 5, 45, 5 } ;
do-while
if-else
goto
for
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
4
2
8
10
True
False
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
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
An Editor
A compiler
An operating system
None of the above
main()
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}
Infinite loop
Hello World
World Hello
Compilation error
delete
concatenate
compare
none of the above
The smallest individual units of c program
The basic element recognized by the compiler
The largest individual units of program
A & B Both
1 byte
4 bytes
8 bytes
16 bytes