You are on page 1of 1

Q1 Find sum of digits of a number.

Q2 Input 10 characters and display count of uppercase and lowercase characters. 

Q3 Calculate the value of nCr, values of n and r are provided by the end user. 

Q4 What will be the output of the following statements?  

(i) float x; 
x= (float) (10/3); 
printf (“%f”, x); 

(ii) char letter =`Z`;  
printf("\n%d",letter);  

  

(iii) int i=0; 
for (; i; ) 
       printf (“%d\t”, i); 

(iv) int a=10, b=20, c=30; 
if (a>b) 
  if (b>c) 
    printf (“stage 1\t”); 
else 
  printf (“stage 2\t”); 

(v) int i= 50; 
do 

  printf (“%d”, i); 
  i ‐= 10; 
} while (i == 0); 

(vi) What is the result of evaluating the following arithmetic expression? 
5+3*2%10‐8*6  

You might also like