Computer Application and Data Processing-Basics of Programming (ISS Statistics Paper I (New 2016 MCQ Pattern)): Questions 13 - 18 of 108

Get 1 year subscription: Access detailed explanations (illustrated with images and videos) to 404 questions. Access all new questions we will add tracking exam-pattern and syllabus changes. View Sample Explanation or View Features.

Rs. 300.00 or

Question number: 13

» Computer Application and Data Processing » Basics of Programming » Control Structures

MCQ▾

Question

What is the output of this C code?

  1. #include <stdio.h>
  2. const int x = 1y = 2;
  3. int main()
  4. {
  5.     int a = 2;
  6.     switch (a)
  7.     {
  8.         case x:
  9.         printf("good ");
  10.         case y:
  11.         printf("badn");
  12.         break;
  13.     }
  14. }

Choices

Choice (4) Response

a.

Good bad

b.

Good

c.

Bad

d.

Compilation error

Question number: 14

» Computer Application and Data Processing » Basics of Programming » Functions

MCQ▾

Question

What is the return-type of the function sqrt ()?

Choices

Choice (4) Response

a.

Depends on the data type of the parameter

b.

double

c.

int

d.

float

Question number: 15

» Computer Application and Data Processing » Basics of Programming » Control Structures

MCQ▾

Question

How many times is the phrase “In the loop” printed?

  1. int a = 6;
  2. int b = 12;
  3. whilea<b;{
  4.     System.out.println("In the loop");
  5.     a+=2;
  6.     b-=2;
  7. }

Choices

Choice (4) Response

a.

2

b.

4

c.

3

d.

None of the above

Question number: 16

» Computer Application and Data Processing » Basics of Programming » Loops

MCQ▾

Question

What is the output of following program?

  1. #include<stdio.h>
  2. int main(){
  3.     int x;
  4.     for(x=10;x<=15;x++);
  5.     printf("%d ",x);
  6.     return 0;
  7. }

Choices

Choice (4) Response

a.

15

b.

Compilation Error

c.

10 11 12 13 14 15

d.

16

Question number: 17

» Computer Application and Data Processing » Basics of Programming » Functions

MCQ▾

Question

The output of following code is:

  1. main()
  2. {
  3.     int x=4;
  4.     int y=5;
  5.     printf("%d",printf("%d%d",x,y);
  6. }

Choices

Choice (4) Response

a.

5 4 3

b.

4 5 3

c.

3 4 5

d.

4 5 4

Question number: 18

» Computer Application and Data Processing » Basics of Programming » Different Programming Languages

MCQ▾

Question

What is the output of this JAVA program?

  1. class average {
  2.     public static void main(String args[])
  3.     {
  4.         double num[] = {5.510.11112.826.92.5};
  5.         double result;
  6.         result = 0;
  7.         for (int i = 0i < 6; ++i)
  8.         result = result + num[i];
  9.         System.out.print(result/6);
  10.     }
  11. }

Choices

Choice (4) Response

a.

11.4666666666

b.

11.46666666666667

c.

11.34

d.

11.5555

Sign In