Professional Documents
Culture Documents
Paper I
Subject: Computers Seat #:
Class: X Section:
Time Allowed: 2 Hours Block #
Sub. Teacher’s sign Date:
Co. Teacher’s sign Invigilator’s Name:
HOD’s sign Invigilator Sign:
INSTRUCTION
1. Read each question carefully, While answering the questions:
1.1.1. Use a black pencil for diagrams. DO NOT use colored pencils.
1.1.2. DO NOT use staples, paper clips, glue, correcting fluid or ink erasers.
1.1.3. Complete your answer in the allocated space only.
1.1.4. DO NOT write outside the answer box.
2. The Marks for the questions are shown in brackets ( )
Marking Block:
Obtained
Marks
50 0
Paper I Paper II 50 Total Marks
printf("a=%d b=%d",a,b);
}
a. a = 200, b = 20 b. a = 200, b = 50
c. a = 200, b = 30 d. a = 200, b = 10
12. What does this statement mean?
x - = y + 1;
a. x=x-y+1 b. x = -x - y - 1
c. x=x+y–1 d. x=x-y-1
13. Study the following statement
for (i = 3; i < 15; i + = 3)
{printf ("%d", i);
++i;
}
What will be the output?
a. 3 6 9 12 b. 3 6 9 12 15
c. 3 7 11 d. 3 7 11 15
14. What will the output after execution of the following statements?
main()
{
printf ("\n Ahmedabad");
printf ("\r Islam");
}
a. Ahmedabad b. Islamabad
c. AhmedIslam d. Islam
15. What will the output after execution of the following statements?
void main()
{
int i = 65, j = 65;
printf ("%d %d", i/5, j%5);
}
a. 13 3 b. 13 0
int main()
{
int i,j,count;
count=5;
for(i=1; i<=5; i++);
{
for(j=1;j<=5;j++);
{
count++;
}
}
printf("%d",count);
}
(A) 25 (B) 30
(C) 35 (D) 40
17. What is output of below program?
int main()
{
int i;
for(i=1; i<=15; i=i+2);
{
printf("cppbuzz");
}
}
(A) cppbuzz is printed 5 times
(B) cppbuzz is printed 8 times
(C) cppbuzz is printed 15 times
(D) Nothing is printed
18. What is output of below program?
int main()
{
int i,j,k,count;
count=25;
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
count--;
}
62. If both numerator and denominator of a division operation in C language are integers, then we get.?
A) Expected algebraic real value
B) Unexpected integer value
C) Compiler error. D) None of the above
75. Choose a syntax for C ?: Question Mark Colon Operator from the list.
A) condition ? expression1 : expression2
B) condition : expression1 ? expression2
C) condition ? expression1 < expression2
D) condition < expression1 ? expression2
76. What is the output of the C statement.?
int main()
{
int a=0;
a = 5<2 ? 4 : 3;
printf("%d",a);
}
A) 4
B) 3
C) 5
D) 2
if(!(a==9))
{
printf("Bear\n");
}
else
{
printf("Elephant\n");
}
printf("Fox");
}
A) Bear Fox B) Elephant Fox
C) Fox D) Compiler error
91. What is the output of C Program.?
int main()
{
int a=9, b=6;
if(a==9 && b==6)
{
printf("Hockey");
}
else
{
printf("Cricket");
}
}
A) Cricket Football B) Hockey Football
C) Football D) Compiler error
92. What is the output of C Program.?
int main()
{
int a=9, b=6;
if(a!=9 || b==6)
{
printf("Hockey\n");
switch(a)
{
case 0: printf("ZERO ");break;
case 5: printf("FIVE ");break;
case 10: printf("DEER ");
}
printf("LION");
}
A) ZERO FIVE DEER LION B) FIVE DEER LION
C) FIVE LION D) Compiler error
100. What is the output of C program with switch statement or block.?
int main()
{
char code='K';
switch(code)
{
case 'A': printf("ANT ");break;
case 'K': printf("KING "); break;
default: printf("NOKING");
}
printf("PALACE");
}
A) KING PALACE B) KING NOTHING PALACE
C) ANT KING PALACE D) Compiler error for using Non Integers as CASE constants.
C programming allows a program to run in an operating system that is different from the one it was created in. The given
characteristic of C programming makes it a
A. portable language.
B. structured language.
C. middle-level language.
D. compiler-based language.
A program outputs the word Hello upon its execution. The minimum number of functions that must be used in this
program is
A. one.
B. two.
C. three.
D. four.
Which of the following options shows the CORRECT features of machine language?
C D
x = 3.1; x = 3.4;
y = 3.1; y = 3.5;
z = 3.4; z = 3.6;
printf("%.2f", x + y + z); printf("%.2f", x + y + z);
} }