ICS Part 2 Computer Science Chapter 10 Short Questions Test With Answer

Online Short Questions For Chapter 10 "ICS Part 2 Computer Science Chapter 10 Short Questions Preparation "

Try The Short Questions For ICS Part 2 Computer Science Chapter 10 Short Questions Preparation

  • Total Questions10

  • Available Sets9

Computer Science - ICS Part 2 Computer Science Chapter 10 Short Questions Preparation

Question # 1

Find the Output of the following code.
#include <stdio.h>
Void main ()
{
int x =10, y= 20, z = 30;
x= x+y;
y =y+z;
z= x-y;
printf("result =%d%d%d",x,y,z);


  • Ans 1: Output :
    Result = 30 50 -20
Submit

Prepare Complete Set Wise Questions For Chapter 10 "ICS Part 2 Computer Science Chapter 10 Short Questions Preparation "

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 1

Question # 1

Find the Output of the following code.
#include <stdio.h>
Void main ()
{
int x =10, y= 20, z = 30;
x= x+y;
y =y+z;
z= x-y;
printf("result =%d%d%d",x,y,z);


  • Ans 1: Output :
    Result = 30 50 -20
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 2

Question # 1

Find the errors in the following piece of code.
#include (stdio.h)
Void Main ()
int a =10;
Printf("%f",a);

  • Ans 1: Errors:
    • 1st errors is Void Main must be written in small letters.
    • 2nd error is in printf statement starting of Printf must be with small letter.
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 3

Question # 1

Find the output of the following code.
Printf("Book\ t reading\n");
Printf("is a \t very good \n habit");

  • Ans 1: Output:
    Book reading
    is a very good
    habit
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 4

Question # 1

Write the output of the following code.
Int x =3;
Printf("%d",x);
Printf("%d",x++);
Printf("%d",++x);

  • Ans 1: Output:
    x = 3
    x = 3
    x = 4
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 5

Question # 1

Write the output of the following code.
Int x= 9;
X = x%3;
Printf("\n%d is result",x);

  • Ans 1: Output: x = 3
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 6

Question # 1

Trace Error.
Include<STDIO.H>
VOID Main ();
{
printf ("Pakistan")
}

  • Ans 1: Error:
    • 1st error is library is written in capital letter which is not allowed.
    • 2nd error is word void is written in capital letter which is not allowed
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 7

Question # 1

Find the output of the following code segment.
Int x = 10;
Int y = 5;
Int z = x+y;
Printf ("%d %d %d",x, y,z);

  • Ans 1: Output: x = 10
    y = 5
    z = 15
Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 8

Question # 1

Trace the output :
Void main () {
CharW1,W2,W3;
W1 ='A'
W2 ='B'
W3 ='C';
Printf ("%c%cW3",W1,W2,);
Getch();
}

  • Ans 1: Output:W3=Cw1 =Aw2 =B

Submit

ICS Part 2 Computer Science Chapter 10 Short Questions Preparation - Set 9

Question # 1

Trace the error.
Int p,q, r;
P = 50000,10
Printf("%d",p);

  • Ans 1: Errors:
    • 1st error is we cannot set two values together to a variable.
    • 2nd error is ;terminator sign has not been used in statement where variable P is declared.
Submit

10th Chapter

12th Computer Science Chapter 10 Preparation

Here you can prepare 12th Computer Science Chapter 10 Problem Solving Preparation. Click the button for 100% free full practice test.

Is this page helpful?