The document contains multiple choice questions about programming concepts. It asks about keywords as variable names, case sensitivity in C, relational operator precedence, loop exit conditions, nested if statements in pseudocode, the "default" statement in C switch cases, output of sample code blocks, debugging tools, pseudocode input keywords, logical operators, debugging methods, delimiters, logical errors, program bugs, flowcharts having multiple starts and stops, the break statement immediately exiting a program, and subprograms in pseudocode being further divided.
1 of 5
More Related Content
De so 2
1. C?U TR? L?I M?U ?? C? KH? N?NG PH?N L?N
L? ??NG. HY V?NG L? ??NG H?T TH?T ^^
1
Keywords can be used as variables names.
False
True
2
The keywords in C are case-sensitive.
False
True
3
The relational operators > >= < <= have the same precedence.
False
True
4
The Repeat?Until loop exits when the condition evaluates to _________.
False
True
5
We cannot use nested if statements in a Pseudocode.
False
True
6
"default" statement in C's switch case is similar to the _______________ the statement in a pseudocode.
END
END CASE
OTHERWISE
7
What will be the output of the following code?
2. main()
{
int a=13, b=20;
if( i=15 || b > 30)
printf("Hello");
else
printf("Sorry");
}
Hello
Sorry
Syntax Error
8
main()
{
int i=5;
while(i=2)
printf("Global Corporation");
} What will be the output?
Global
Global Corporation
Runtime Error
Syntax Error
9
main()
{
int s1=2;
while(s1==2)
{
x=x-1;
printf("%d",x);
}
} What will be the output:
1
2
Runtime Error
10
main()
{
int i=1;
while(i<=5);
3. {
printf("%d",i);
i++;
}
} what will be the output?
Logical Error
Runtime Error
Syntax Error
11
main()
{
int s1=1;
for( ;s1; )
printf("A");
} What will be the output?
A
Runtime Error
Syntax Error
12
Which of the following is/are the tool/s for debugging?
Break point
Check point
Error Tracing
Simulator
Trace routines
13
The keyword/s used to take user input in a Pseudocode is/are
Accept
Input
Prompt
Read
Take
14
The Logical operators are:
And
False
Not
Or
4. True
15
Identify the methods used for debugging.
Dry Run
Independent Inspection
Structured walk through
Testing
Tracing
16
Which of the following are the delimiters used in programming languages?
()
< >
[]
{}
Tracing
17
Which of the following will generate a Logical error?
avg=a+b c (c=0)
IF (A< >0 AND A< >1) Then??.
Infinite loop
Read Abc.doc (abc.doc does not exist)
Tracing
18
Which of the following statements are true?
The # symbol may not be used as the first character of a variable
The $ symbol may not be used as the first character of a variable
The % is used to calculate a percentage thus: 10 % 20=50
The / operator is used to divide one value by another
19
Which of the following statements with respect to Program Bug are True?
A bug is a semantic error in a program.
The program with a bug will compile and run but produces incorrect or unexpected results.
The program with a bug will fail to compile.
To find a bug, you can use the method of tracing through the program by hand, step-by-step.
You can use a special program called a debugger, which will help you find bugs.
20
5. A flowchart can have more than one START & one STOP.
False
True
21
When the loop encounters a break statement, it immediately exits the program.
False
True
22
The subprogram in a pseudocode can be further divided into smaller programs.
False
True