Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BLUE PRINT
Short
Answer
Question
(SA)
Type 1
2 marks
1
2
1
Short
Answer
Question
(SA)
Type 1
3 marks
1
1
1
Long
Answer
Question
(LA)
4 marks
Total
UNIT 1
UNIT 2
UNIT 3
Very
short
Answer
Question
(VSA)
1 mark
1
3
1
1
1
1
10
14
10
UNIT 4
36
Total
13
Total question:32
Total Marks : 70
Time : 3 Hrs.
Note:
o All questions are compulsory.
o Programming language used c++.
o Question 2 to 14 carry 2 marks
o Question 15 to 19 carry 3 marks
o Question 20 to 24carry 4 marks
Q.1
a)
b)
b)
d)
e)
f)
g)
h)
i)
Cin<<x;
For(y=1,y<x,y++)
Cout<<x*y;
}
Q.4 What do you mean by exit control loop? Give example.
Q.5 Name the header file(s )required in the given code:
Void main()
{
Char name[40];
Strcpy (name,bharat);
Strrev(toupper(name));
Puts (name); }
Q.6 What is diference between local and global variable
Q.7 Write a program to print Fibonacci series upto n number,
where n is given by user.
Q.8 Name the header files for given functions:
i)
Islower()
ii)
Rand()
iii)
Frexp()
iv)
Exit()
v)
Q.9 What will be the output:
#include<iostream.h>
#include<string.h>
void main()
{
Charmes1[]=SKy, mes2[]=ThE;mes3[]=LiMIT;
Int l1=strlen(mes1);
Int l2=strlen(mes2);
Int l3=strlen(mes3);
Int n=l1+l2+l3;
For (int c=0;c<n;c++)
{ if c%4==0)
{cout<<mes2[l2-1];
L2--;
}
Else
If (c%3==0)
{
Cout<<mes[l1-1]<<endl;
L1--;
}else
{
Cout<<mes3[l3-1];
L3--;
}
Q.1 Write an program to read 10 integer values for an array and
0
find largest and smallest value in array.
Q.1 Write a program to count number of digit, alphabets and
1
special characters in a string given by user.
Q.1 Rewrite the code using switch case:
2
Char code;
Cin>>code;
If (code==A)
Cout<<Accountant;
Else
If (cofe==C || code==G)
Cout<<Grade IV;
Else
If (cout==F)
Cout<<Financial Advisor;
Q.1 Write a program to print given structure, for n lines, where
3
n given by user:
*
**
***
****
******
Q.1 Write a function sum () to calculate the sum of given series.
4
Where long n and int x passed as parameter
1-x2/2+x3/3 x4/4!+xn/N
Q.1 Give the time period and basic processing techinques for
5
any three generations of computer
Q.1 Write a program to swap two variable without using third
6
variable.
MARKING SCHEME
NOTE:
There may be several methods of solving a problem as
well as explanation of questions. So evaluation of answer
scripts should be accordingly.
Questi
on
numb
er
Q.1 i)
Answer
Marks
(1/2 +1/2)
ii)
iii)
iv)
v)
8
Tb>pb>nb>gb>mb>kb>byte>nibble>bit
1
1
vi)
vii)
One
viii)
(1/2 +1/2)
Q.2
1.
2.
3.
4.
CISC
1.
2.
It is fixed size
Homogenous value set
Compile time memory allocation
(1/2 +1/2)
for each
Simplification of compilation
Generate sequence of machine
instructions
3. Provides a single machine instruction
for each statement in HLL
4. It incorporates variable length
instruction fomat
RISC
1.Relatively few instruction
2.Memory Access limited to load and store
instructions
3. All operation done within the registers
of the CPU
4. Fixed length, easily decoded instruction
format
Q.3
#include<iostream.h>
int main()
{
Intx,y;
Cin>>x;
For(y=1;y<x;y++)
Cout<<x*y;
Return 0;
}
Q.4
1+1
Q.5
String.h, ctype.h
Q.6
1+1
Q.7
#include <iostream.h>
#include <conio.h>
Void main ()
{
Intn,first=0,second=1,third=0;
Cout<< enter number up to you want
print series;
Cin>>n;
Cout<<first<<endl<<second;
For(int i=1; third<=n;i++)
{third=first+second;
Cout<<third<<endl;
First=second;
Second=third; }
Getch();
}
for
headrfiles
and main
for
vardeclation
and
initaliztion
1 for logic
and output
Q.8
Q.9
Q.10
iv)
# include<iostream.h>
# include <conio.h>
int main (){
int values[ 10 ]; intsmall,big;
big=small=values[0];
for ( int i = 0; i < 10; i++ ) {
cout<< "Enter value " << i << ": ";
cin>> values[i];
}
for (int i = 0; i < 10; i++)
if(values[i]>big)
{
big=values[i];
}
}
for
declaration
and reading
value
1 for logic
for result
display
if(values[i]<small)
small=values[i];
}
}
cout<< "The biggest number is " << big
<<endl;
cout<< "The smallest number is " << small
<<endl; }
Q.11
# include<iostream.h>
# include <conio.h>
Void main ()
{
Char str[80];
Intalph, num,spcial;
vowel=conso=secial=0;
Cout<< enter string;
Getline(str,80,\n);
If ((str>=65)||(str<=80)||(str>=91)||
(str<=116))
Alph++;
Else
If ((str>=81)||(str<=90))
Num++
Else
Special++;
Cout<<Number of alphabet in string
is :<<aplh<<endl;
Cout<<Number of digits in string
is :<<num<<endl;
Cout<<Number of special character in
string is :<<special<<endl;
Getch();
}
for
headerfile
for
variable
declatration
and
initialization
for logic
for output
Q.12
Char code;
Cin>>code;
Switch(code)
{
Case:A
Cout<<Accountant;
Break;
Case:=C || G
Cout<<Grade IV;
Break;
Case:F
Cout<<Financial Advisor;
Break;
Q.13
# include<iostream.h>
# include <conio.h>
Void main ()
{
Int n;
Cout<< Enter no of lines:; cin>>n
For (int i=1; i<=n;i++)
Cout<<endl;
For (int j=1; j<=i;j++)
Cout<<*;
Getch();
}
for
headerfile
for
variable
declatration
and
initialization
1 for logic
Q.14
# include<iostream.h>
# include <conio.h>
Void main ()
{
Inta,b;
Cout<< Enter two values to swap:;
for
headerfile
for
variable
declatration
and
Q.15
Q.16
1+1+1
cin>>a>>b;
A=a+b;
b=a-b;
a=a-b;
Cout<<\nvalues after swapping
are\n<<a<<b;
Getch();}
initialization
1 for logic
for output
Q.17
1+1+1
Q.18
1 for
prototype
1 for logic
1 for output
Q.19
1+1+1
Q.20
i)50=110010
.375= .011
ii) Is 10010
2s 10011
i)1+1
ii)1+1
Q.21
i)
ii)
1+1
2
Q.22
1 for two
steps
1+1+1+1
Q.23
Q.24
..