New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Download Model question papers & previous years question papers

Posted Date: 29 Aug 2008      Posted By: E.Suganya      Member Level: Bronze

2007 Vellore Institute of Technology M.C.A Computer Aplications Programming in 'C' University Question paper



Course: M.C.A Computer Aplications   University: Vellore Institute of Technology




VIT
University
(Estd. u/s 3 of UGC Act 1956)
MCA - I Semester
Subject : Programming in C


Duration : 90 Minutes Max. Marks : 50

Part-A (4X5=20)
Answer all the questions.

1. (i) What is the purpose of the function prototype? (1)
(ii) What would be the size of the pointer variables of type float, integer and character? (1)
(iii) Can we have the same name for the actual and formal parameters? Give necessary explanation. (2)
(iv) What is meant by scope of the variable? (1)

2.Specify the output or the errors for the following. Assume all the necessary header files are included in the following codes.
(i)void main()
{
int *i=10;
float *f=2.3;
char *c=’c’;
printf(“%d%f%c”,i,f,c);
}

(ii)void main()
{
int a=10,b=5;
char s=’A’;
printf(“%d”,a>b);
printf(“%f”,(float(int)s));
}

(iii)void main()
{
int t=1;
do {
printf(“Hello – It is C programming”);
while(t>2)
}

(iv)void main()
{
float a=10.23,b=4.5,c=45;
int x = 20;
char c = ‘A’;
printf(“%d”, (a>b)? ‘A’:’a’);
printf(“%d”, x>’A’);
}

(v)void display(int x)
{
printf(“%d”,x);
}
void main(void)
{
int i=10;
if((i>10) && (i<50))
display(i);
}

3.Write a function to print all the digits whose least significant digit is 3 between the range 1 to 100. Pass the range to the function using pass by value.

4.Write a function which omits all the the digits that is divisible by 3of a given number. Say for example, given input is 2356891, digits that are divisible by 3 are 3,6,9 and the expected output is 2581.(Without using arrays).Pass the number to the function using pass by reference only.

Part - B (3X10=20)
Answer all the questions.

5.(i) Extend the following code with the help of the address of the pointer variable to display the values of i and j. (2)

#include
#include
Void main()
{
int *ptr, i=20,j=30;
ptr=&i;
printf(“%d”,*ptr);
ptr=&j;
printf(“%d”,*ptr);
}

(ii) Write a program to find all the divisors of the composite numbers between the range 1 to 10. (Note : Numbers other than prime are called as composite numbers. (5)

(iii) Can a function return a address? Give an example for the same. (3)

6.(i) Explain switch case with necessary examples. (6)
(ii)State the difference between while loop and do-while loop. (2)
(iii)Explain any three shorthand arithmetic operators. (2)

7.(i)What would be the output for the following code. (2)
#include
#include
int main()
{
int i =1;
switch(i)
{
case 1: printf(“Vit”);
case 2: printf(“University”);
default:printf(“Welcomes all”);
}
return;
}

(ii) Rewrite the following code using the increment operator and do-while loop. Assume all the necessary header files and void main are included in the following code. The output for the rewritten code should be the same as the code given below. (3)
int i=0;
while(i<=50)
{
i=i+5;
printf(“%d”,i);
}

(iii) Specify the output or the error for the following. Assume all the necessary header files and void main are included in the following codes. (5)

(a)int i=0;
for((i==0);i<5;i++)
printf(“%d”,i);

(b)for(;;)
{
printf(“infinite loop”); break;
}

(c)int a=6,b=8;
for(;--a>0;)
printf(“%d%d”,a,--b);

(d) Rewrite the following code with the ternary-if.
If(a>b)
printf(“A is greater”);
else
printf(“B is greater”);

(e)int a=5,b=5; a&=b;
b&=1; printf(“%d%d”,a,b);





Return to question paper search

Next Question Paper: 1B.Tech Supplimentary Examination ,Aug/Sept 2008

Previous Question Paper: Continuous Assessment Examination II(Programming in 'C')

Related Question Papers:


  • term end


  • Programming in 'C'


  • MODEL QUESTION PAPER FOR Seventh Semester B.E. Degree Examination (Common to all branches) Constitution of India & Professional Ethics.


  • Continuous Assessment Examination II(Programming in 'C')


  • Continuous Assessment Examination-I(Programming in 'C')


  • Categories


    Submit Previous Years University Question Papers and make money from adsense revenue sharing program

    Are you preparing for a university examination? Download model question papers and practise before you write the exam.



    Advertise Here





    Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

    ISC Technologies.
    2006 - 2009 All Rights Reserved.