WorksheetsTECHNICAL QUIZ
Total questions: 45
Worksheet time: 45mins
What is the range of values that can be stored by int datatype in C?
a. -(2^31) to (2^31) -1
a. -256 to 255
a. -(2^63) to (2^63)-1
a. 0 to (2^31)-1
Which is valid C expression?
int my_num=100,000;
int my_num=100000;
int my num =1000;
int $my_num=10000;
Which of the following is true about interpreters?(C language)
They translate the entire program at once.
They execute programs faster than compilers.
they translate and execute code line by line
they are not used in modern programming
which of the following is a valid declaration of a char?(java)
char ch='\utea';
char ca='tea'
char cr=\u0223;
char cc='\itea';
What is the output of the following code?
public class Main{
public static void main(String []args){
int x = 10;
int y = 5;
int z = (x > y) ? x : y;
System.out.println(z);
}
}
10
5
15
the code will not compile due to syntax error
Which of these keywords are used for the block to be examined for exceptions?(java)
check
throw
catch
try
Which class provides system independent server side implementation?(java)
Server
ServerReader
Socket
ServerSocket
Amongst which of the following is / are the application areas of Python programming?
Web Development
Game Development
Artificial Intelligence and machine learning
All of the mentioned above
The picture is the logo of which company?
ExxonMobile
Walmart
Nvidia
Alphabet
Which algorithm is used for hierarchical clustering?
K-means clustering
Agglomerative clustering
DBSCAN
principal Component Analysis(PCA)
Which one of the following is not a Java feature?
Object-oriented
Use of pointers
Portable
Dynamic and Extensible
Which option should be selected to work the following C expression?
string p = "HELLO";
typedef char[] string;
typedef char *string;
typedef char[] string; and typedef char *string;
such expression cannot be generated in c
Which option should be selected to work the following C expression?
string p = "HELLO";
typedef char[] string;
typedef char *string;
typedef char[] string; and typedef char *string;
such expression cannot be generated in c
Which type of Programming does Python support?
object-oriented programming
structured programming
functional programming
all of the above
What will be the output of the following Python code?
i = 1
while True:
if i%3 == 0:
break
print(i)
i + = 1
1 2 3
error
1 2
none
What is the order of namespaces in which Python looks for an identifier?
Python first searches the built-in namespace, then the global namespace and finally the local namespace
Python first searches the global namespace, then the local namespace and finally the built-in namespace
Python first searches the built-in namespace, then the local namespace and finally the global namespace
Python first searches the local namespace, then the global namespace and finally the built-in namespace
Amongst the following which is not a database management software?
MySQL
COBOL
Sybase
Oracle
Who is the founder of the company ‘Walmart’?
Sam Walton
Sachin Bansal
Jensen Huang
Bill Gates
What will be the output of the following C code?
#include <stdio.h>
int main()
{
signed char chr;
chr = 128;
printf("%d\n", chr);
return 0;
}
128
-128
Depends on the compiler
none of the above
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 10000;
int y = 34;
printf("Hello World! %d\n", y);
return 0;
}
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
Functions can return enumeration constants in C?
true
false
depends on the compiler
depends on the standard
What will be the output of the following Java code?
class increment {
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}
32
33
24
25
Which of the following for loop declaration is not valid?
for ( int i = 99; i >= 0; i / 9 )
for ( int i = 7; i <= 77; i += 7 )
for ( int i = 20; i >= 2; - -i )
for ( int i = 2; i <= 20; i = 2* i )
In which process, a local variable has the same name as one of the instance variables?
(java)
serialization
variable Shadowing
Abstraction
Multi-threading
An interface with no fields or methods is known as a __. (java)
Runnable interface
marker interface
Abstract interface
CharSequence interface
Which of the following declarations is incorrect in python language?
xyzp = 5,000,000
x y z p = 5000 6000 7000 8000
x,y,z,p = 5000, 6000, 7000, 8000
x_y_z_p = 5,000,000
list, tuple, and range are the ___ of Data Types.(python)
Sequence Types
Binary Types
Boolean Types
None of the mentioned above
What is the value of the postfix expression 6 3 2 4 + – *?
74
-18
22
40
Identify the different features of Big Data Analytics.
open source
data recovery
scalability
all of the above
Which keyword is used to prevent any changes in the variable within a C program?
immutable
mutable
const
volatile
How many bytes does "int = D" use?
0
1
2 or 4
10
. Which environment variable is used to set the java path?
MAVEN_Path
JavaPATH
JAVA
JAVA_HOME
What will be the output of the following program
public class Test {
public static void main(String[] args) {
int count = 1;
while (count <= 15) {
System.out.println(count % 2 == 1 ? "***" : "+++++");
++count;
} // end while
} // end main
}
15 times ***
15 times +++++
8 times *** and 7 times +++++
both will print only once
Which of these cannot be used for a variable name in Java?
identifier & keyword
identifier
keyword
none of the above
Is Python case sensitive when dealing with identifiers?
no
yes
machine dependent
none of the above
What will be the output of the following Python code?
print("abc. DEF".capitalize())
Abc. def
abc. def
Abc. Def
ABC. DEF
What are the values of the following Python expressions?
2**(3**2)
(2**3)**2
2**3**2
512,64,512
512,512,512
64,512,64
64,64,64
Which of the following tree data structures is not a balanced binary tree?
Splay tree
B-tree
AVL tree
Red-black tree
Computer word size is a multiple of______ bits
4
10
16
1024
The standard header _______ is used for variable list arguments (…) in C.
<stdio.h >
<stdlib.h>
<math.h>
<stdarg.h>
Which of the following declaration is not supported by C language?
String str;
char *str;
float str = 3e2;
Both “String str;” and “float str = 3e2;”
What will be the output of the following C function?
#include <stdio.h>
enum birds {SPARROW, PEACOCK, PARROT};
enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
int main(){
enum birds m = TIGER;
int k;
k = m;
printf("%d\n", k);
return 0;
}
0
compile time error
1
8
Which one of the following is the use of function in python?
Functions don’t provide better modularity for your application
you can’t also create your own functions
functions are reusable pieces of programs
All of the mentioned
What arithmetic operators cannot be used with strings in Python?
*
-
+
all of the mentioned
