How To Exam?

a knowledge trading engine...


Vellore Institute of Technology 2007 M.C.A Computer Aplications Programming in 'C' - Question Paper

Friday, 01 February 2013 07:00Web

VIT
U N I V E R S I T Y
(Estd. u/s three of UGC Act 1956)

School of Computing Sciences
MCA (I Semester) Term End exam 2007
Subject : Programming in C
Subject code : 05MCA505

Duration : 3 Hours Max Marks : 100
Part – A (8 X five = 40)
ans All the ques.

1.Specify the output or the errors for the following, presume all the necessary header files are included.
(i) void main()
{
int i=10,j=20;
printf("%d\t",i,j);
i=20;j=30;
printf("\n%d\t%d",i);
}

(ii)void main()
{
int a=5;
printf("%d%d%d",++a,a,a++);
}

(iii)void main()
{
int i=100,j=200,*ptr;
ptr=&i;
*ptr=400;
printf("i=%d",*(&i));
*ptr=j;
printf("j=%d",*ptr);
}
(iv) presume the memory allocated for the array is as follows 65518, 65520, 65522, 65524. The memory allocated for the pointer variables and i are 65516, 65514, 65512.
void main()
{
int a[ ]={1,2,3,4},*p,*q,i;
clrscr();
for(i=0;i<4;i++)
printf("\t%u",a+i);
p=&a[1];
q=&a[0];
printf("\t%d",p-q); }

(v)
void main()
{ int a=10,b;
printf(“%d”,(a==10));
printf(“%d”,!a);
a=scanf(%d%d”,&b);
printf(“%d”,a); }

2.Write a recursive function to generate Fibonacci series of ‘n’ terms. learn ‘n’ as the input from the user.

3.Write a program to perform the subsequent in a 2 dimensional array of order ‘n’.
(i)Swap the 2 rows of the matrix. If the order of the matrix is 3, swap the first row elements with the third row.
(ii)Find the maximum element in every row of the matrix.
(iii)Find the minimum element in every column of the matrix.

4.Write short notes on void pointer. And also mention why, typecasting is needed for the deferencing operation of the void pointer.

5.Write a program to dynamically create a square matrix of order, not more than three and obtain the transpose of the matrix.

6.A learner record has the subsequent details : Rollno, name, department, course, year of joining, marks in five subjects. Create a structure of 100 students. Write a function to print the names of all students who joined in a particular year.



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Vellore Institute of Technology 2007 M.C.A Computer Aplications Programming in 'C' - Question Paper