Thursday, November 26, 2015
Total No. of Questions: 09
Paper ID [MC102]
PROGRAMMING IN C (MCA-102)
Time: 3 Hrs. Max. Marks: 60
Instruction to Candidates:
1. Attempt any one question from each Sections A, B, C & D.
2. Section-E is Compulsory.
1. (a) What are the four classes of data types supported by ANSI C.
(b) Explain stepwise the automatic type conversion for the following.
Int I, x;
Long int I;
X=+I * f-d;
2. (a) How can enum be used to create user defined data type?
(b) Write a program that reads a string including blanks spaces until ‘\n’ is encountered.
3. (a) What are the differences between while & do while construct.
(b) Write a program that accepts a string, reverses the string and prints it.
4. (a) Write a program that finds the largest of the three numbers using nested if statement. Also give its flowchart.
(b) Write a program that uses a recursive function to print Fibonacci sequence. (Fibonacci sequence is 0,1 ,1 2, 3, 5, 8 and so on)
5. (a) What is the difference between a structure and a union.
(b) Write a program that defines a structure book having members name, author and price and compares two variables of type book.
6. (a) Write a program using pointers to compute the sum of all elements stored in an array.
(b) Explain the difference between Call by Value & Call by Reference.
7. (a) Explain fseek( ) function.
(b) Write a program that sorts an array using bubble sort method.
8. (a) Write a program that writes all reads ten numbers and writes all odd numbers to a file ODD & all even numbers to a five EVEN.
(b) Explain malloc( ) function using an example.
9. (a) What will be the output of the following
Int a=5, b, c;
Printf(“%d %d %d \n”, a, b, c, );
(b) What will be the output of the following
(i) Printf(“%11.4e”, -98.7654);
(ii) Printf(“%-20.10s”, “NEW DELHI 110001”);
(c) What is the difference between a character ‘A’ & string “A”.
(d) What is the difference between a static and auto variable?
(e) Define register variable.
(f) Explain strcmp function.
(g) What is a preprocessor directive?
(h) What is type casting?
(i) What will be output of the following
Int fem=995, mal=1000, x;
Printf(“%d %y”, x,y);
(j) What is the scale factor in pointer variables.
punjabtechnicaluniversity.blogspot.in Roll No......................... ... Total No. of Questions : 07] ...
Roll No……….. Total No. of Questions: 07 B.Com. (Sem.-1 st ) FINANCIAL ACCOUNTING Subject Code: BCOP-101 Paper ID: [B1101] ...
punjabtechnicaluniversity.blogspot.in Click Here for Syllabus of B-Tech 1st Year . http://ptu.ac.in/userfiles/file/engg_syllab/1st_and_...
Business Organisation and Management, Question Paper of B.Com 1st Semester,Download Previous Years Question Paper 2Roll No…….. Total No. of Questions: 07 B.Com (Sem.-1 st ) BUSINESS ORGANIATION AND MANAGEMENT Subject Code: BCOP-102 (2011 &a...
Roll No……. Total No. of Questions:07 B.COM (Sem.-1 st ) BUSINESS MATHEMATICS SUBJECT CODE: BCOP-104 (2011 Batch) PAPER ID: ...
punjabtechnicaluniversity.blogspot.in Roll No. ...................... Total No. of Questions : 13] ...
punjabtechnicaluniversity.blogspot.in Master Of Technology (M-Tech) Syllabus SYLLABUS FOR MASTER OF TECHNOLOGY (M-Tech) Br...
punjabtechnicaluniversity.blogspot.in Click Downlink for Dowload of Scheme and Syllabus of B.Com. Professional Batch 2011onwards ht...
B.Sc. IT (402) (S05) / 102 (New) (Sem. - 4th) BASIC MATHEMATICS – I, Punjab Technical University, PTU, Question paperpunjabtechnicaluniversity.blogspot.in Roll No. ................. Total No. of Questions : 13] ...
punjabtechnicaluniversity.blogspot.in Roll No . ............ Total No. of Questions : 07) ...