NEW
Font size
WorksheetsSPARK FIDDLE
Total questions: 20
Worksheet time: 10mins
Choose a right “c “statement
Loop or repetition block executes group of statements repeatedly.
Loop is usually executed as long as a condition is met.
Loops usually take advantage of loop counter.
All the above.
Loop in “C” language is implemented using.
While Block
Do while Block
For Block
All the above
A pointer is
A keyword used to create variables.
A variable that stores address of an instruction.
A variable that stores address of other variables.
All of the above.
The printf() function retunes which value when an error occurs?
Positive value
Negative value
Zero
None of These
Which of these about a dictionary is false?
The keys of a dictionary can be accessed using values
The values of a dictionary can be accessed using keys
Dictionaries aren’t ordered
Dictionaries are mutable
In python, Dictionaries are immutable.
False
True
Which of these are the escape sequence in python string formatting
Newline
Backslash
Single quotes
All of the above
Find the right pair from the following
w=open a file for reading
r=open a file for writing
+=open a file for updating
b=opens in text body
Python function always returns a value
False
True
What is the output of the following function call
def fun1(name, age=20):
print(name, age)
fun1('Emma', 25)
Emma 25
Emma 20
.”C” is a low level language
True
False
First _____ characters of identifier are significant
45
67
63
53
In python programming pass is a null statement
True
False
How many times it will print the statement?
for i in range(100):
print(i)
101
99
100
0
The keyword used to transfer control from a function back to the calling function is
switch
goto
go back
return
The function scanf( ) returns
The actual values read for each argument
1
0
The number of successful read input values
ASCII values of the input read
Which keyword is used to come out of a loop only for that iteration?
break
continue
return
none of the mentioned
Comment on the following C statement.
int (*a)[7];
An array “a” of pointers
A pointer “a” to an array
A ragged array
None of the mentioned
𝐓𝐮𝐩𝐥𝐞𝐬 𝐜𝐚𝐧 𝐛𝐞 𝐮𝐩𝐝𝐚𝐭𝐞𝐝 𝐚𝐧𝐝 𝐜𝐡𝐚𝐧𝐠𝐞 𝐭𝐡𝐞 𝐯𝐚𝐥𝐮𝐞𝐬 𝐨𝐟 𝐭𝐮𝐩𝐥𝐞 𝐞𝐥𝐞𝐦𝐞𝐧𝐭
True
False
𝐖𝐡𝐚𝐭 𝐭𝐲𝐩𝐞 𝐨𝐟 𝐞𝐫𝐫𝐨𝐫 𝐨𝐜𝐜𝐮𝐫𝐬 𝐢𝐟 𝐰𝐞 𝐭𝐫𝐲𝐢𝐧𝐠 𝐭𝐨 𝐚𝐜𝐜𝐞𝐬𝐬 𝐚𝐧 𝐢𝐧𝐝𝐞𝐱 𝐨𝐮𝐭𝐬𝐢𝐝𝐞 𝐨𝐟 𝐭𝐡𝐞 𝐭𝐮𝐩𝐥𝐞 𝐢𝐧𝐝𝐞𝐱 𝐫𝐚𝐧𝐠𝐞?
𝐓𝐲𝐩𝐞 error
Index Error
Syntax error
Logic error
