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

7.Answer the subsequent.
(a)Can the null character of a string can be changed by zero?. provide your ans with necessary explanation. (1)

(b)Does the initialization of a character array requires to provide null character along with string? If provided 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 2 dimensional array will allocate memory continuously for all the elements in the matrix. State whether the statement is actual or false. (1)
8.Write a program to check whether the provided word is current in the file or not.

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

9.Write a program to obtain the mean, variance and standard deviation for a 1 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 provided number as follows
Input : 12456 Output 14162536 (square of the individual digits) (4)

(b) Write a program to display all the numbers ranging from the range one 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 subsequent 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 kind cast the return kind 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 ranging from a structure and a union? (1)

13. Write short notes on the subsequent.

(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 subsequent data members : pid, pname, disceasename, dateofadmission. Declare dateofadmission as a structure containing day, month, year. find the details for five patients using arrays. Your program should display the following:

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

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

16.A customer record has the subsequent 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 replace the details in the file. Display all customer details after modification.





( 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