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
U N I V E R S I T Y
(Estd. u/s 3 of UGC Act 1956)

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

Duration : Three Hours Max Marks : 100
Part – A (8 X 5 = 40)
Answer All the questions

1.Specify the output or the errors for the following, Assume 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) Assume 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. Read ‘n’ as the input from the user.

3.Write a program to perform the following in a two dimensional array of order ‘n’.
(i)Swap the two rows of the matrix. If the order of the matrix is 3, swap the 1st row elements with the 3rd row.
(ii)Find the maximum element in each row of the matrix.
(iii)Find the minimum element in each column of the matrix.

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

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

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

7.Answer the following.
(a)Can the null character of a string can be replaced by zero?. Give your answer with necessary explanation. (1)

(b)Does the initialization of a character array requires to give null character along with string? If given so, will it generate error? (2)

(c) When creating a dynamic character array using calloc function what the bytes of memory will be initialized to? (1)

(d)Dynamic allocation of two dimensional array will allocate memory continuously for all the elements in the matrix. State whether the statement is true or false. (1)
8.Write a program to check whether the given word is present in the file or not.

Part – B (6 X 10 = 60)
Answer Any Six

9.Write a program to find the mean, variance and standard deviation for a one dimensional array of integers of size n.
(i)Mean = sum of the elements/n
(ii)Variance = temp /n, where temp = temp + (mean-x[i] * mean-x[i])
(iii) Standard deviation = square root of variance.

10. (a)Write a program to print the output of a given number as follows
Input : 12456 Output 14162536 (square of the individual digits) (4)

(b) Write a program to display all the numbers between the range 1 to 100 whose sum of their individual digits is 4. Say for example, 13,22,31,40, etc have the sum of their individual digits as 4. (6)

11.(a)Declare a variable length character array. Assign the starting address to a pointer and display the elements of the array using pointers. (4)

(b) Initialize an array of pointers with month names. Pass this pointer as an argument to a function. From that function display the month based on user request. (6)

12.(a)Write short notes on the following with necessary examples.
(i) malloc (ii) calloc (iii) realloc (6)

(b) What does the above mentioned functions will return on failure and why do we require to type cast the return type of those functions. (1)
(c) Can we call the main function from program. (1)
(d)What is the purpose of including header files in the programs? (1)
(e)What is the difference between a structure and a union? (1)

13. Write short notes on the following.

(i) Pointer to function. (3)
(ii) Enumerated data type (2)
(iii) Macros (2)
(iv) Local variable of a function, global and static variable. (3)

14.Declare a structure called hospital consisting of the following data members : pid, pname, disceasename, dateofadmission. Declare dateofadmission as a structure containing day, month, year. Obtain the details for 5 patients using arrays. Your program should display the following:

(i) Display all the details of all patients
(ii) Given the pid, obtain the details of the particular patient.
(iii) Given the month and year, find all patients admitted in that month and year.

15.Write a program with the help of a user defined function which is a substitute for strpbrk to print the string from the first occurrence of a given character. For example, the string is “Tamil Nadu welcomes all” and the given character is ‘w’. The expected output is “welcomes all”.

16.A customer record has the following details : Acc number, name, balance. Create a file of customer records. Accept the account number and the operation (withdrawal/deposit) to be performed from the user. Accordingly modify the details in the file. Display all customer details after modification.





Return to question paper search

Next Question Paper: Continuous Assessment Examination-I(Programming in 'C')

Previous Question Paper: TYBSC-IT C # ( C Sharp ) 2005 May

Related Question Papers:


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


  • Programming in 'C'


  • Model paper(Digital Computer Fundamentals)


  • term end


  • 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.