void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
Hello
World
Compilation error
Hello World
B. World
abstract
Virtual
Dynamic
Typeid
True
False
They begin with a hash symbol
They are processed by a preprocessor
They form an integral part of the code
They have to end with a semi colon
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 } ;
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
True
False
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
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);
4
2
8
10
True
False
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
True
False
True
False
main()
{
unsigned int a = 10;
while (a>=10)
{
int a; a-- ;
}
printf("%i", a);
}
Infinite loop
9
0
None
const X* const
X* const
X*
X&
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
main()
{
int sub[50];
for(i=0; i<=48;i++)
{
sub[i]=i;
printf("
%d", sub[i]);
}
}
0 to 48 will be displayed
48
49
Compilation Error
[]
{}
()
None of the above
3.4e38 to 3.4e38
32767 to 32768
32768 to 32767
32668 to 32667
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
253
254
255
256
''
" "
'a'
abc'
True
False
True
False
putchar(65)
putchar('x')
putchar("x")
')
True
False
True
False
#if
#elseif
#undef
#pragma
enumeration
iteration
culmination
pass through