WorksheetsNEXOVATE_SAMPLE_2
Total questions: 25
Worksheet time: 13mins
1)What is the output of the following code snippet?
int x = 5;
printf("%i", x++);
printf("%i", ++x);
return 0;
5,7
6,7
5,6
None of the above
What is the purpose of the 'sizeof' operator in C?
It returns the size of a variable in bytes
It returns the size of a function in bytes
It returns the size of a datatype in bytes
It returns the size of a string in bytes
Which of the following is NOT a valid variable name in C?
_myVar
123var
var123
my_Var
What is the purpose of the "if" keyword in python programming?
To declare a variable
To define a function
To conditionally execute code
To perform arithmetic operations
Which of the following data structures is typically implemented using a Last-In-First-Out (LIFO) approach?
Queue
Stack
Linked List
Tree
In which sorting algorithm does the swapping of elements occur repeatedly until the array is sorted?
Merge Sort
Bubble Sort
Quick Sort
Insertion Sort
Which of the following is NOT a fundamental data type in C programming?
int
float
char
string
Which of the following is used to terminate the loop ?
break
return
continue
exit
Which of the following is NOT a valid keyword in C?
main
function
return
break
What is the purpose of the 'continue' statement in a loop?
It skips the current iteration of the loop and continues with the next iteration.
It terminates the loop.
It returns a value from the loop.
It jumps to a specific label within the loop..
What is the output of the following code snippet?
int x = 10;
int y = 5;
printf("%d", x+++y);
return 0;
15
16
20
Compilation error
Which of the following languages are case sensitive?
1. c
2. c++
3. java
4. python
only 1,2,3
only 2,3,4
only 2,3
1,2,3,4.
public class Main{
public static void main(String[] arr){
int num1 = 500;
int num2 = 500;
Integer num3 = 500;
Integer num4 = 500;
if(num1==num2){
System.out.print("num1==num2");
}
else{
System.out.print("num1!=num2");
}
System.out.print(" & ");
if(num3==num4){
System.out.print("num3==num4");
}
else{
System.out.print("num3!=num4");
}
}
}
num1 == num2 & num3 == num4
num1 == num2 & num3 != num4
num1 != num2 & num3 == num4
num1 != num2 & num3 != num4
public class Main{
public static void main(String[] args)
{
System.out.println('j' + 'a' + ''v'' + 'a');
}
}
j312
java
230va
418
Which of the following is an exit controlled loop?
While loop
For Loop
Do-While Loop
None Of the Above
Array is a collection of different data type in java?
Which symbol is used to represent an input/output operations in flowchart ?
circle
parallelogram
oval
rectangle
Which programming language is called as the mother of programming languages?
c++
COBOL
c
python
In c, if size of a character is one byte, then what is the size of the array given below ?
char arr[]="Welcome to Nexovate";
19
17
20
21
what is the size of the array given below ?
float a[5];
4
9
20
5
What type of data structure is used in google maps?
graph
tree
linked list
heap
Which of these is a selection statement?
break
continue
for
if
What is the output ?(easy)
class Output
{
public static void main(string arg[])
{
double x=2.0;
double y=3.0;
Double z=Math.pow(x,y);
System.out.println(z)
}
}
6.0
8.0
3.0
None of the above
Which of the following is not an access modifier?
protected
void
private
public
Which one of the following is an application of Stack Data Structure?
Managing function calls
The stock span problem
Arithmetic expression evaluation
All of the above
