Computer Programming 2022 Question Paper — Government College of Engi…
The 2022 Computer Programming previous year question paper (Government College of Engineering and Technology, Jammu), with every question and its marks.
- University: Government College of Engineering and Technology, Jammu
- Subject: Computer Programming
- Course: COMPUTER PROGRAMMING
- Year: 2022
- Paper: end-term
- Duration: 180 minutes
- Total marks: 100
Instructions
- Attempt five questions in all, selecting at least two questions from each section.
Questions
SECTION-A
- Q1. (a). 1. (a) What are different basic data types in C? How these are extended? Explain memory requirements and range of values that can be stored in these data types. [10 marks]
- Q1. (b). (b) Explain bitwise, increment and decrement, conditional operators with examples. [10 marks]
- Q2. (a). 2. (a) Write a C program to generate and print the numbers between 100 and 200 which are divisible by 3 but not divisible by 4. [10 marks]
- Q2. (b). (b) How does a switch statement works? List the difference between switch and if else ladder statement. [10 marks]
- Q3. (a). 3. (a) Explain the following storage classes with example: (i) auto storage class (ii) static storage class (iii) extern storage class (iv) register storage class [10 marks]
- Q3. (b). (b) Explain the for loop and nested for loop with suitable examples. [10 marks]
- Q4. (a). 4. (a) Evaluate the following expressions: (i) $22 + 3 < 6 \ \&\& \ !5 \ || \ 22 == 7 \ \&\& \ 22 - 2 > +5$ (ii) $a + 2 > b \ || \ !c \ \&\& \ a == d \ *a - 2 < = e$ Where $a = 11, b = 6, c = 0, d = 7$ and $e = 5$. [5 marks]
- Q4. (b). (b) Convert the following mathematical expression into C equivalent: (i) $\text{area} = s(s-a)(s-b)(s-c)$ (ii) $x = -b + \text{b2}-4\text{ac}$ [5 marks]
- Q4. (c). (c) Write a program in C to print the numbers which are divisible by 7 in the range 7 to 100 using while loop. [10 marks]
SECTION-B
- Q5. (a). 5. (a) What is function? Explain different classification of user defined functions based on parameter passing and return type with examples. [10 marks]
- Q5. (b). (b) Write a C program to read N integers into an array A and to find the (i) sum of odd numbers, (ii) sum of even numbers, (iii) average. [10 marks]
- Q6. (a). 6. (a) Define string. How string is declared and initialized? Explain string input/output functions with an example. [10 marks]
- Q6. (b). (b) Write a c-program using structures to read, write, compute average - marks and display the students scoring above and below the average marks for a class of N students. [10 marks]
- Q7. (a). 7. (a) Explain array of structures and structure within a structure with examples. [10 marks]
- Q7. (b). (b) What is pointer? Explain how the pointer variable declared and initialized? Write a C program to swap two numbers using call by address(pointers or reference) method. [10 marks]
Related pages
Other years
- Computer Programming 2022 question paper — end-term
- Computer Programming 2022 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term
- Computer Programming 2018 question paper — end-term