QUESTION
BANK FOR SPA
| 
Q.1 | 
02 Marks
  Questions. | |
|  | 
a)  
    | 
List
  any 4 Escape sequence characterwith their meaning.  | 
|  | 
b)  
    | 
Explain
  following format specifiers. 
%d,
  %f, %c, %ld | 
|  | 
c)   
    | 
Write
  an Algorithm for addition of two numbers. | 
|  | 
d)  
    | 
Explain
  features/properties of flowchart. | 
|  | 
e)  
    | 
What
  is flowchart? List out symbols used in flowchart. | 
|  | 
f)   
    | 
What
  is Type Casting? Give example. | 
|  | 
g)  
    | 
Explain
  any 4 relational operators. | 
|  | 
h)  
    | 
Explain
  any 4 logical operators. | 
|  | 
i)    
    | 
Explain
  the following Library functions. 
i)           
  floor()       | 
|  | 
j)   
    | 
Which
  are the following are valid/invalid identifiers? Give reason. 
i)           
  _7number 
ii)          
  Basic 
  Salary | 
|  | 
k)  
    | 
Explain
  any 4 short hand (Compound assignment) operators. | 
|  | 
l)    
    | 
int
  a=5, b=6, c=7,k; 
K=a+b>c-b&&a-b<c; 
Give
  preference and associativity for the above operators. | 
| 
Q.2 | 
05 Marks
  Questions. | |
|  | 
a)  
    | 
Explain
  data types in ‘C’. | 
|  | 
b)  
    | 
Explain
  the following operator. 
i)    
  && 
ii)  
  & 
iii) 
  Sizeof 
iv)  ++ 
v)  
  ?: | 
|  | 
c)   
    | 
Find
  the output. 
#include<stdio.h> 
void
  main() 
{ 
int
  x=10,y,z; 
z=y=x; 
y-=--x; 
z-=x--; 
x-=--x-x--; 
printf(“x=%d
  y=%d z=%d”, x,y,z); 
getch(); 
} | 
|  | 
d)  
    | 
Find
  the roots of Quadratic equation. 
Is
  the above problem definition complete? If not, make this problem definition
  complete. | 
| 
Q.3 | 
05 Marks
  Questions. | |
|  | 
a)  
    | 
Write
  a program in ‘C’ to find out Largest of 3 numbers using ternary operator. | 
|  | 
b)  
    | 
Write
  a program in ‘C’ for swapping of 2 numbers without using temporary variable. | 
|  | 
c)   
    | 
Write
  a program in ‘C’ to accept 3 digitsnumber and display its reverse number. | 
|  | 
d)  
    | 
Explain
  the following unformatted I/O functions. 
i)    
  getchar() 
ii)  
  getch() 
iii) 
  putchar() 
iv)  getche() | 
