Sunday, March 30, 2014

FE SPA Q. Bank

Q.1
02 Marks Questions.

a)       
What is function? List advantages of functions.

b)       
Differentiate between while and do-while.

c)        
Compare if-else-if and switch-case.

d)       
Explain break with example.

e)       
Explain continue with example.

f)        
Find the output
void main()
{
    for(i=1; i<=100; i++);
     {
     printf(“This will print 100 times”);
     printf(“\n i=%d”,i);
     }
}

g)       
Find the output.
void main()
{
   for(i=1; i<=10;i++)
    {
      if(i%5==0)
      break;
      if(i%3==0 || i==1)
      continue;
      printf(“%d\n”,i);
    }
}


h)       
What do you mean by actual parameters and formal parameters.

i)         
void main()
{
    char ch='y';
    switch(ch)
      {
         case 'y':printf(“YES”);
         case 'n':printf(“NO”);
         default:printf(“INVALID”);
      }
}

j)         
Explain switch case with syntax.

k)       
Find the output.
void main()
{
   int i=1;
    {
      printf(“i=%d”,i);
      i++;
    }
     while(i<=10)
      i++;
      printf(“i=%d”,i);
}


l)       
Write a program to check whether the entered year is a leap year or not.
Q.2
05 Marks Questions.

a)       

            5
         4 5
      3 4 5
   2 3 4 5
1 2 3 4 5


b)       
   
         1
      1 2 A
   1 2 3 B A
1 2 3 4 C B A


c)        
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5


d)       

* * * * * * *
   * * * * *
      * * *
         *

Q.3
05 Marks Questions.

a)       
Write a program in ‘C’ to find out factorial of a number using function.

b)       
Write a program in ‘C’ to generate an Armstrong numbers from 100-999.

c)        
Write a menu program in ‘C’ to find area of geometry figures listed below.
  1. Circle
  2. Square
  3. Rectangle
  4.  

d)       
Write a program in ‘C’ to generate prime numbers from 1-100.

No comments:

Post a Comment

Lecture PPTs of MIS , Module 4 to Module 6

 Module 4 Social Computing (SC): Web 3.0 , SC in business-shopping, Marketing, Operational and Analytic CRM, E-business and E-commerce B2B B...