Tag Archives: Holiday

Holiday Homework / Revision Sheet Class XI Sub: Computer Science Prepared By: Mr. Paritosh Srivastava

 

Day 1 (26/09/2017)

Q.1  Convert the following numbers as expected.                                     

            (a)  (1001.101)2 =  (    )10

            (b)  (75)8 =  (    )16

Q.2  What is type casting .Explain with example.

Q.3  What is main role of sizeof( ) in C++ ? Explain with example.

Q.4  What is BOOTING process? How it is important in Computer?

Q.5  What is difference between interpreter and complier?

Q.6  Draw the block diagram for nested if- else statement.

Q.7  Explain any 2 factors which affect to processor performance.

Q.8  Explain either Time sharing or real time operating system.

Q.9  Explain the operator precedence with suitable example.

Q.10  Explain about different states of process in operating system.

Day 2 (27/09/2017)

Q1. What are C++ tokens.

Q2. What is cascading of I/O operators?

Q3. What is the difference between ‘h’ and “h” in c++?

Q4. How are files and devices implemented at lowest level?

Q5. What is an interpreter?

Q6.How many times “hello” will be printed in the following code fragment:

for (i=0; i<5; i++)

cout<< “hello”;

Q7.Evaluate the following, where a, b, c are integers and d, f are floating point numbers.

The value of a=8, b=4 and d=2.5

  • f = a * b + a/b
  • c = d-a + b % a
  • c= (++a) * (b++) – (++d)
  • f = (++b) / b – a %b

Q8. Explain ‘break’ and ‘continue’.

Q9. What is the output of the following:

  1. # include<iostream.h>

void main ( )

{

int i=0;

for (i=1; i<=20;i++)

{

cout<<i;

i=i+2;

}

}

 

  1. # include<iostream.h>

void main( )

{

a=3;

a=a+1;

if (a>5)

cout<<a;

else

cout<<(a+5);

}

Q10. What will be the output of the following program segment:

If input is as:

(a) w     (b) r     (c) s     (d) f

cin >>code

switch (code)

{

case ‘w’: cout<<”winter”;

case ‘r’ : cout<<”rainy”;

break;

case ‘s’ : cout<<”summer”;

break;

default: cout<<” wrong code”;

}

Day 3 (28/09/2017)

1.Write a program in c++ to calculate the commission for the salesmen. The commission is calculated as follows.

Sales

Made

Commission

Rate

30001 onwards 15%
22001 to 30000 10%
12001 to 22000 7%
5001 to 12000 3%
0 to 5000 0%

 

  1. Write a program to calculate and print the roots of a quadratic equation ax2+bx+c=0.

 

  1. A bank accepts a fixed deposit for one year or more and the policy it adopts on interest is as follows:
  2. i) if a deposit less than 2000 and for 2 or more years , the interest rate is five percent compound annually.
  3. ii) if a deposit is Rs. 2000 or more but less than Rs. 6000 and for 2 or more years, the interest rate is seven percent compounded annually.

iii) if a deposit is more than  or equal to Rs. 6000 and for 1 year or more , the interest rate is eight percent compounded annually.

  1. iv) on all deposits for 5 years or more , interest is ten percent compounded annually.
  2. v) on all other deposits not covered above conditions, the interest is three percent compounded annually.

Given the amount deposited and number of years, write a program to calculate the money in the costumers account at the end of the specified time.

 

  1. Write a program in c++ using conditional operator to find the largest of three numbers entered through keyboard.

 

  1. A computer programming contest requires teams of 5 members each. Write a program that ask the user to enter number of players and then display the total number of teams and number of player left over.

 

  1. Write a program to calculate the area of a circle or triangle or rectangle according to the choice given by the user.

 

  1. What will be the output of the following code fragment?

 

int year;

cin>> year;

if(year % 100==0)

{

if(year%400==0)

cout<<”Leap”;

}

else

cout<<” Not  a century year.

If the input given is

  1. 2000
  2. 1900
  • 1971

 

  1. What is dangling else problem? How is it overridden? Give example.
  2. Predict the output of the following code fragment:
  3. i) int a, b=3;

cin>>a;

if(a)

b=a++ -1;

cout<< “a=”<<a<<endl;

cout<<”b=”<<++b<<endl;

When the value of a is input as 6.

  1. ii) cin>>a;

if(a=5)

cout<<”Five”;

else

cout<<” Not Five”;

if the input given is 7.

  1. Distinguish between a unary, binary and a ternary operator. Give example of c++ operators for each one of them.                                 Day 4 (29/09/2017)

 

  1. What is type conversion? How many types of type conversion is allowed in c ++. Explain with example.
  2. Name the header files required for successful execution of a program that uses the following components:
  3. i) endl ii) setprecision( )          iii) ceil( )          iv) fabs( )
  4. What is the effect of access specifiers on data type?

How  does it affect the floating point data type?

  1. What are the differences between syntax and runtime errors? Give example.
  2. What is the memory requirement for the following constants?
  3. i) “ Meera\’s Birthday” ii) “\?” iii) ‘\a’ iv) “my name”
  4. Write the equivalent C++ expression for the following expressions:
  5. i) tan-1 1  + tan-1 1 + tan-1 1 + tan-1 1p

3            5            7            8     4

  1. ii) y = [ sinx ]tan x + [ cos x]sec x
  2. What are constants? How these are different from ordinary variables?
  3. Predict and correct the logical error present in the following code fragment:

if(k=1)

cout<<”ONE”;

else

cout<<” NOT ONE”;

  1. Define the following terms:
  2. i) Refference Variable
  3. ii) Abstraction

iii) pointer

  1. Predict the output of the following codes:( Make sure the Syntax is correct)
  2. i) if(1)

cout<<” Be careful”;

cout<<”You might commit a mistake”;

  1. ii) if(!5)

cout<<” How many times”;

else

cout<<”No more please”;

cout<<” O.K”;

iii) if(0)

cout<<”Third time again”;

cout<<”Last chance”;

else

cout<<” Very good”;

 

Day 5 (30/09/2017)

 

  1. Write alternate code for the following codes using
  2. i) Only if
  3. ii) Using conditional operator

if(a= = 0)

cout<<” Zero”;

if(a= = 1)

cout<<” One”;

if(a = =2)

cout<<” Two”;

  1. Fill in the blanks:
  2. i) (100011101)2=(_______)10
  3. ii) (354)8=(______)2

iii) (A6D12)16=(____)8

  1. Write the 1’s Complement form of the following binary numbers:

100010111, 11101

  1. Expand the following: BIOS, ISCII, SJN, SRAM
  2. Write shortly about the 3rd generation computers.
  3. What do you mean by Non-Preemptive scheduling?
  4. Write the Name of 4 Operating systems that are used world wide.
  5. What do you mean by utility software? Give one example.
  6. What is BOSS? Write the names of softwares of this family.
  7. Define the term Booting.
  8. What is a Path?

12 What is a keyword? Is ‘asm’ a key word?

Advertisements