Questions 21: What is the name of the method that examines particular data entity and determines what data elements need to be associated with it ?
Answer: d)Entity Relationship diagram
Questions 22: What will be output for the below ?
public class main
{
public static void main(String[] args)
{
int x = 1/2;
if(x == 0.5)
System.out.println(x+1);
else
System.out.println(x*2);
}
}
Enter your answer ONLY as a NUMERAL, in the box.
Note: In this question, you have to enter a value in given box which should be the output of the code.
Answer: 0
Explanation:
x will be assigned with 0. On comparing 0 with 0.5, we will get false, hence else will be executed, 0 * 2 = 0
Questions 23: Which of the following functions is used to accept string with white spaces ?
Answer: c) gets();
Questions 24: Select the correct code for opening a file for writing in binary mode.
Answer: b) FILE *f = fopen("abc.bin","wb");
Questions 25: We CANNOT overload ________ operator.
Answer: b) ::
Questions 26: What is the mathematical function used to round off 6.23 to 7 ?
Answer: b)ceil(6.23)
Questions 27: Which argument is passed to fflush() ?
Answer: c) stdin
Questions 28: What will be the output-
public class Main {
public static void main(String[] args)
{
int $ = 5;
}
}
Answer: a) Nothing will print
Questions 29:
class Main
{
public static void main(String args[])
{
int i,j,x=0;
for(i=0;i<5;i++)
for (j=0;j<5;j++){
x=(i+j-1);
System.out.print(x);
break;
}
System.out.print(x);
}
}
What will be printed when the above sample code is executed.
Enter your answer ONLY as a NUMERAL, in the box.
Note: In this question, you have to enter a value in given box which should be the output of the code.
Answer: a)-101233
Questions 30: When we declare constant pointer to integer, we CANNOT change -
Answer: b) Address in the pointer variable.