Font size
WorksheetsProgramming in C language
Total questions: 18
Worksheet time: 12mins
What is the output given by this C code?
3210
321
Compiler error
3
In C programming language, what is the symbol II?
Arithmetic operator
This symbol is unrecognised in C
Logical operator
This is the name typically given to an int variable
Fill the blank: instruction _____ is used to provide a value to the instruction that called a function
result
return
exit
break
In C variables can ONLY be declared as numeric?
TRUE
FALSE
Which instruction will print on the screen exactly the text \n?
printf(“n\”);
printf(“n”);
printf(“\\n”);
printf(“\n”);
a=5, b=3, 0
a=5, b=3, c=4
a=5, b=3
Compiler error
Which symbol always finalizes an instruction in C code?
(a)
Is this code correct? (no errors or warnings)
No, the name myprint is not correct
Yes, there is no problem at all
No, if it indicates int in the signature, a value should be returned
Yes, but k is printed as a double number
What is a pointer in C?
Any element in a C program
It refers to the memory address of a variable
It is exactly a regular variable
It is a specific kind of function
Which instruction is for choosing among multiple options depending on the value of a single variable? (Just one word in lowercase)
(a)
A single-line comment in C starts by...
/*
//
;
:
Fill the gap: A _______ variable, declared in a function, will only be available for that function
local
global
fake
lazy
Fill the gap: If a parameter received by a function could be changed, pass-by-__________ is necessary
value
reference
free
One _________ is a derived datatype, built using several elements which could be from distinct datatype
loop
array
include
struct
The collection of multiple elements of the same nature and linearly indexed under the same name is called...
struct
array
matrix
variable
Could we assign a float variable to a long integer in C?
YES
NO
When inside a function a call to itself is done we call it...
Iteration
Reiteration
Recursion
This is forbidden
One constant is…
Procedure/function which always does the same
Global variable all functions can use
Global variable all procedures can use
Value which can not be modified after its declaration
