Font size
WorksheetsQuiz last paper
Total questions: 25
Worksheet time: 18mins
Following are characteristics of imperative paradigm EXCEPT
A. Consists of series of statements
B. Central features are variables, assignment statements and iterations
C Program execution involves changing the memory contents
D Able to execute codes from distributed computing
Following are characteristics of functional paradigm EXCEPT
A. Consists of statements of works
B. Abstraction is in functions
C Program execution involves functions calling each other
D. Simpler paradigm compared to imperative
Which of the statements are TRUE about declarative paradigm characteristics
A. Consists of predicates and rule inference
B. Able to be applied within mathematical formulation
Which of the statements are TRUE about object oriented paradigm characteristics
A. Programming with concrete data types
B. Paradigm concepts include polymorphism and inheritance
What are the compilation phases of any paradigm?
Lexical Analysis
Syntax Analysis
Semantic Analysis
Code Generation
All of above
What are the generations of programming languages?
1GL Machine Code
2GL Symbolic assemblers (101010)
3GL Imperative languages (Human Languages)
4GL Domain specific application generators (eg JAVA)
5GL Al Languages (Machine Learning)
What are language evaluation criteria?
Readability
Writability
Reliability
Cost
All of above
Is the following conversion TRUE or FALSE
TRUE
FALSE
Is the following conversion TRUE or FALSE?
TRUE
FALSE
How many times does the statement "I am a genius" get printed?
10
4
2
0
What is the output of the program?
A. Theatre
B. Theatre
Hurray...
No output
D. Compilation Error
What is the output of the program?
A. 4,3,2,1,0,4
4,5,2,1,0,4
B. 5,4,3,2,1,0
5,4,3,2,1,0
C. Error
D. 5,4,3,2,1,0
5,4,3,2,1,0
5,4,3,2,1,0
If you don't initialize a static array, what will be the element set to?
A. Zero
B. A floating point
C. An undetermined
D. None of above
What is the answer of: 7%3
A. 25
B. 1
C. 2
D. 3
Which is the correct way to declare a pointer?
A. int_ptr;
B. int *ptr;
C. *int ptr;
D. None of above
Maximum number of elements in the array declaration int a [5] [8] is
A. 28
B. 32
C. 35
D. 40
malloc() function used in dynamic allocation available in which header file?
A. stdio.h
B. stdlib.h
C. iostreams.h
D. mem.h
The operator + in a+=4 means
A. a=a+4
B. a+4=a
C. a=4
D. a=4+4
An Ampersand before the name of a variable denotes
A. Actual value
B. Variable name
C. Address
D. Data type
What are the main types of programming paradigm?
Imperative (C language)
Functional (Pascal Language)
Declarative (Prolog)
Object Oriented (Java)
Scripting (Phyton)
Concurrent (Haskell)
None of above
Which operator has the highest priority?
A. ++
B. %
C. +
D. ||
What is the output of the program ?
A. 5
B. 1
C. No output
D. Name error: name 'num' is not defined
What will be the output of the while loop if num = [1,2] ?
A. 1
B. 2
C. 3
D. No output
E. Compilation error
Explain how the output generated
Explain below code in your own word
int main()
{
int i = 5;
while(i-- >= 0)
printf("%d,", i);
i=5;
printf("\n");
while(i-->= 0)
printf("%i", i);
while(i-- >= 0)
printf("%d,", i);
return 0;
}
