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

Define Escape sequence.

  • Ans 1: Escape sequences are characters which are specified in the format string of the printf statement in combination with backslash (\). These cause an escape from the normal interpretation of a string so that the next character is recognized as having special meaning.
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

Define Escape sequence.

  • Ans 1: Escape sequences are characters which are specified in the format string of the printf statement in combination with backslash (\). These cause an escape from the normal interpretation of a string so that the next character is recognized as having special meaning.
Submit

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

Question # 1

Trace out the errors in the following code.
Int a,
Prin ("%d",a);

  • Ans 1: Errors:
    • 1st error is variable a must be declared with data type char.
    • 2nd error is spelling of printf in print statement is wrong.
Submit

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

Question # 1

Compare getch and getche functions

  • Ans 1: Getch ( ) function:

    • Getch function is very handy is character manipulation.
    • It does not eco the character typed.
    • It does not accept any arguments.
  • Ans 2: Getche ( ) function:
    • Getch function is very handy is character manipulation
    • It echo the character typed
    • It does not accept arguments.


Submit

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

Question # 1

Trace output :
Int a =512;
Printf ("a+= %5d",a);
Printf ("a =%1d",a);

  • Ans 1: Output:
    a= 512
    a=512
Submit

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

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 6

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

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

Question # 1

Trace the output.
Void main ( ){
Int x,y, z;
X = 10;
Y = 20;
Z = 30;
X = x+ y;
Y = y+ z;
Z = x- y;
Printf("result = %d%d%d\n",x,y,z);
getch();}

  • Ans 1: Output
    Result = 30, 50 10
Submit

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

Question # 1

Find the output of the following code .
Printf ("Pakistan\n is an \n Islamic \ n country");

  • Ans 1: Output:
    Pakistan
    is
    an
    Islamic
    Country
Submit

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

Question # 1

Trace the output of the following code.
{
Int x, y, z;
X = 3;
Y = 2;
z = 4;
Printf(%ds%d%d,x+y, y+5, x+z);
Getche();
}

  • Ans 1: Output: 5,7,7
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.

Share your comments & questions here

Guest
  • No comments yet. Be the first to comment!