Computer Programming 2018 Question Paper — Government College of Engi…
The 2018 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: COMPUTERING PROGRAMMING
- Year: 2018
- 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) Define data types. Explain primary data types in details (06) (b) Define variable? How can we declare a variable and assign the value into variables? Explain with example. (06) (c) Draw a flowchart and algorithm to solve a quadratic equation. (08) [20 marks]
- QQ2. (a) Compare the "Break" statement with that of exit (). When do we use "continue" statement? Explain with suitable examples. (10) (b) What do you mean by looping? Give the syntax of looping statements in C. (10) [20 marks]
- QQ3. (a) Write a program using a 'do while' loop to calculate and print the first 'm' Fibonacci numbers (08) (b) What is string? Explain with syntax various string handling functions. Write a 'C' Program to find substring of string without using Library Function. (12) [20 marks]
- QQ4. (a) What are the commonly used input/output function in C? How are they accessed? (10) (b) Discuss in detail with examples difference between all the four storage classes . (10) [20 marks]
SECTION B
- QQ5. (a) Differentiate between local and global variables. Explain scope and lifetime of both types of variables. (08) (b) What is structure? Why structure is needed? Differentiate between structure and array. Also Create structure "Employee" with Eno, name, salary, DOJ. Read at least 10 records & display records of employees whose salary is more than 50000. (12) [20 marks]
- QQ6. (a) Write a program that computes the sum of following series: $x - x^3/3! + x^5/5! - x^7/7! + .........$ to n terms. The value of 'x' and 'n' is to be given by the user.(make use of functions) (08) (b) Write a recursive program to solve Towers of Hanoi problem. (06) (c) Write a program in 'C' to remove all duplicate elements from an array.. (06) [20 marks]
- QQ7. (a) Define the concept of using pointers in C. Write a program to find the palindrome of a number using pointers. (08) (b) What is dynamic memory allocation? Write and explain different dynamic memory allocation functions in C . (12) [20 marks]
- QQ8. (a) Describe various modes of opening a data file in C. (06) (b) Different between the following (i) fread( ) and fscanf( ) (ii) fwrite( ) and fprintf( ) (iii) getw( ) and putw( ) (iv) fseek( ) and ftell( ) (08) (c) Write a C program to read and display a text from file. (06) [20 marks]
Related pages
Other years
- Computer Programming 2022 question paper — end-term
- 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