Questions 31: What will be the output of the given program?
void main()
{
char a[10][10]={"kellos","hellos","fellos"};
printf("%s",a[1]);
}
Answer: c) hellos
Questions 32: In a Singly Circular Linked List, how many address fields are there?
Answer: d) 1
Questions 33: What will be the output of the following program ?
public class Main
{
public static void main(String[] args)
{
try
{
int []arr={10,25,2,6,8,9,7,32};
for( int i=0; i < arr.length; i++)
{
System.out.println(arr[i+1]);
}
}
catch(Exception e)
{
System.out.println("Inside Exception");
}
}
}
Type your answer in box.
Answer:
25
2
6
8
9
7
32
Inside Exception
Questions 34: What will be the output ?
class car
{
public void Show()
{
System.out.println("Brand is not defined yet");
}
}
class mercedes extends car
{
public void Show()
{
System.out.println("Its mercedes");
}
}
class Benz extends mercedes{
}
public class Main
{
public static void main(String args[]){
car obj=new Benz();
obj.Show();
}
}
Answer: b) Its mercedes
Questions 35: Select best suitable answer for below functions
1. sizeof()
2. strlen
Answer: a) sizeof() - Returns size of string including null characters
strlen() - Return size of string excluding null characters
Questions 36: When we compose a binary tree through the given preorder sequence, what will be left child of 6?
(Note : Consider 4 as root node)
4, 2, 1, 3, 6, 5, 7
Answer: NA
Questions 37: Which of the following is NOT a logical operator?
Answer: b) &
Questions 38: The data modeling phase consists which of the following ?
Answer: a) Creation of the logic data model
Questions 39: What will be the output of the below code?
public class Main
{
int x=10;
public static void main(String args[])
{
try{
Main t1= new Main();
System.out.println(t1.x);
}
catch(Exception e)
{
System.out.println("Exception cought");
return ;
}
}
static {
int x= 20;
System.out.println(x+" ");
}
}
Answer: Compile Time error
Questions 40: Based on below infix and postfix expressions, identify prefix expressions ?
Infix Expression: P - Q * ( R + S ) / ( W - X ) * Y + Z
Postfix Expression : P Q R S + * - W X - Y * / Z +
Answer: NA