Sample Question Papers

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Sample Question Papers as PDF for free.

More details

  • Words: 560
  • Pages: 3
SAMPLE QUESTION PAPER OF PROGRAMMING IN ‘ C ‘

9017

Exam Seat No.

Maharashtra State Board of Technical Education Course: Computer Engineering Group

Course Code: CO/CM/IF/CD

Semester: Second Title of the Subject: Programming in ‘C’

Subject Code: 9017

Duration :- 3 Hours

Marks: 80

Instructions: 1) All questions are compulsory 2) Illustrate your answers with neat sketches wherever necessary 3) Figures to the right indicate full marks 4) Assume suitable data if necessary 5) Preferably, write the answers in sequential order Q.1 a) b) c) d) e) f) g) h) i) j) Q.2 -

Attempt any eight of the following:

16 marks

What is function prototype? Give one example of function prototype. State four arithmetic operators and four logical operators. Give the meaning of declaration : int *ptr; Declare one dimensional, 5 elements integer array ‘List’ and initialize all values. What is keyword? State two keywords of C. Explain pointer variable. What are formal parameters in functions? Write the syntax of the if-else statement. State any four string handling functions. What is the purpose of break statement? Attempt any Three of the following:

12 marks

a) Write a program to generate the following output using loop structure: 1234 123 12 1 b) State four storage classes. Explain any one.

c) Explain the switch-case statement with syntax. d) Describe the use of conditional operator. What is its associativity? Q.3 -

Attempt any Three of the following:

12 marks

a) Explain the if-else statement execution with its flowchart. b) For the following program fragment, derive the output generated by printf statement: int val2 = 255; float num = 79.54123; printf(“%4d, %x, %7.3, %8.3e”, val2, val2, num, num) ; c) Explain the concept of array of pointers with example. d) Explain the representation of two-dimensional array with example. Q.4 -

Attempt any Four of the following:

16 marks

a) Write a program to take four integer values as input and print the average. b) Explain the use of pointers in call by reference parameter passing for functions. c) Explain the string handling function strcmp() in detail. d) Write a program using pointers to swap (exchange) the values of two integer numbers. e) Differentiate between while and do-while loop structures. f) Write a program using array to read the ten integer numbers and find the counts for number of positive and negative numbers. Q.5 -

Attempt any Three of the following:

12 marks

a) Explain the terms character set, tokens, constant and variables. b) Find out errors in the following program component and justify the same: float i; int p = 0; for (i=0; i = 10; i += 2) { p=i*2; printf(” %d ”, i, p) ; } c) Write a program to reverse the given integer number. ( e.g. input : 2356, the reverse is 6532 ) d) Explain with example the array of structure.

Q.6 -

Attempt any Three of the following:

12 marks

a) Write a program to find whether the given year is a leap or not. b) Write a program to declare the structure ‘point’ with x, y coordinates as its members. Find the third member of structure ‘quad’ - the quadrant in which the point lies. c) Explain the concept pointer’s arithmetic operations. d) Explain the meaning of following statements with reference to pointers: int *ptr, m = 8; *ptr = m ; ptr = &m ;

Related Documents

Sample Question Papers
November 2019 23
Question Papers
June 2020 13
Question Papers
May 2020 15
Question Papers
June 2020 7
Ads Question Papers
November 2019 17