Class Test 1 - 2007-2008

  • 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 Class Test 1 - 2007-2008 as PDF for free.

More details

  • Words: 263
  • Pages: 1
K. K. WAGH POLYTECHNIC, NASHIK - 3. Department of Computer and Information Technology Class Test – I (Feb – 2008) CLASS: FYIF / FYCM TIME: 1 hr. SUB: PROGRAMMING in C (CPR - 9017) MARKS: 20. = = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = Note: All the questions are compulsory.

Q.1 Attempt any two.

(2*2)

4

1. Define: Variable and Keyword with example. 2. Explain difference between pre-decrement and post decrement operator with an example. 3. Write the syntax of do-while loop.

Q.2 Attempt any two.

(4*2)

8

1. Explain the rules for creating variable’s name. 2. Write a program using ‘for’ loop to print following output.

* * * *

* * *

* *

*

3. Explain the use of ‘continue’ statement with appropriate example.

Q.3 Attempt any two.

(4*2)

8

1. Write the output of following program code and justify your answer. int x = 10; switch ( x ) { default: printf(“\n Welcome”); case 1: printf(“\n to”); case 2: printf(“\n C”); break; case 3: printf(“\n Programming”); } 2. Modify following program to use the ‘for’ loop for getting the same output. int a = 0,sum = 0; while (a<10) { sum = sum + a; a++; } printf(“\n Addition is : %d”, sum); 3. Write a program to find whether entered number is prime or not? Take input from user.

CPR (FYIF) by Mr. Kute T. B. (Lecturer in IT, KK Wagh Polytechnic, Nashik 2007-2008)

Related Documents

Class Test 1
June 2020 7
Class Test 1 - 2007-2008
November 2019 7
Class Test 1 (syllabus 5100)
November 2019 15
Cursos-20072008
June 2020 29
Class Test 2 Result
November 2019 17