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 } ;
A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;
1 byte
4 bytes
8 bytes
16 bytes
True
False
Only once
At least once
More than Once
Any one of the above
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
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
True
False
main()
{
unsigned int a = 10;
while (a>=10)
{
int a; a-- ;
}
printf("%i", a);
}
Infinite loop
9
0
None
91
88
90
89
True
False
4
7
6
0
main()
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}
200
500
30
Unpredictable
to go to the next iteration in a loop
come out of a loop
exit and return to the main function
restarts iterations from beginning of loop
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
main()
{
int a = 5, b = 6;
(a == b? printf("%d", a));
}
0
5
Error
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
35
45
55
40
True
False
253
254
255
256
''
" "
'a'
abc'
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
An Editor
A compiler
An operating system
None of the above
24
2
26
None
do-while
if-else
goto
for
break
continue
exit
All of the above
True
False
A
B
BCPL
C++
True
False
0
NULL
1
none of the above