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.
- Each question carries 20 marks.
Questions
SECTION - A
- QQ1. (a) What is algorithm? Explain the steps involved in the development of C algorithms. (10) (b) What are header files? What is need of header files in 'C' programming? Explain the role of preprocess directives in 'C' programming by taking suitable example. (5) [20 marks]
- QQ2. (a) What is the use of loop? Describe the syntax and purpose of while, do-while and for loop using programming example. (10) (b) Explain bitwise, increment and decrement, conditional operators with examples. (10) [20 marks]
- QQ3. (a) Discuss the syntactic rules to be followed while using goto statement ? Are there any restrictions that apply where control can be transferred in a C program? Why the use of goto statement is discouraged? Explain with example. (10) (b) Write a program in C to print all prime numbers between 50 to 500. (10) [20 marks]
- QQ4. (a) What is a library function? List out different mathematical library functions available in C programming and mention their functions and uses. (10) (b) Write a C program to find the length of a given string without using built-in functions. Also check whether the given string is palindrome or not. (10) [20 marks]
SECTION - B
- QQ5. (a) What is an array? What are the different ways of initializing the arrays? What are the disadvantages of an array? Discuss. (10) (b) Write the program for the following a. To list all the number which are divisible by 2 in an array of 'n' integers. b. To search an element in an array of 'n' elements. c. To find the sum of odd even number in a given list of values. (10) [20 marks]
- QQ6. (a) Represent a complex number using a structure in C. Write a C program that uses functions to perform the following operations: (i) Addition of two complex numbers (ii) Subtraction of two complex numbers (10) (b) Write a program to demonstrate passing an array argument to a function. Consider the problem of finding largest of N numbers defined in an array. (10) [20 marks]
- QQ7. (a) How to initialize and access pointer variable? Explain pointer to a function with example. (10) (b) Write a program in C to read two file names, append the first file content at the end of the second file content. (10) [20 marks]
- QQ8. (a) Write a program that changes every 5th character of data file into uppercase. (10) (b) Explain with examples :- (i) Pointer Array (ii) Structure with pointers (10) [20 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