Cpr - Qb Chapter 01 New

  • July 2020
  • 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 Cpr - Qb Chapter 01 New as PDF for free.

More details

  • Words: 418
  • Pages: 2
K. K. Wagh Polytechnic Nashik

Question Bank: Programming in ‘C’ (9017) Class: FYIF Chapter No. 01 Basic of C Summer 2007 Marks 1. State different data types supported by ‘C’ language (W-2007). 2 2. Write a ‘C’ statement for each of the following: 2 i. Relational operator. ii. Assignment operator. 3. State the use of increment and decrement operator and give its precedence and Associativity. 4 4. Define the following: 4 i. Expressions ii. Data types iii. Bitwise operators iv. Logical operators Winter 2007 1. Explain the use of bitwise operator. 2 2. State the use of increment and decrement operators. Also give difference between i++ and ++i with example. 4 3. What is variable? How to declare it? How variable differs from constant? 4 Summer 2008 a) What is variable declaration and variable initialization? 2 b) What are the uses of printf( ) and scanf( )? 2 c) List different relational and logical operators. What will be the output of following program? 4 #include<stdio.h> void main( ) { float a = 5, b = 2; int c; c = a % b; printf(“%d”,c); } d) State use of %c %d and %f. 4 Write output of following: #include<stdio.h> main( ) { float y = 123.456; printf(“%f %.3f %.1f \n\n”, y, y, y); } e) Define the following: 4 1) Keyword 2) Variable. 3) Data types 4) Constants.

CPR – Question Bank Chapter 01

-1-

K. K. Wagh Polytechnic Nashik

Winter 2008 a) State four relational operators with its meaning. 2 b) State four printf format codes. 2 c) State the arithmetic and logical operators with its meaning. 4 d) Write a program to take marks of five subjects and display the total and average. 4 e) State four rules of choosing variable’s name. 4 f) What is the output of the following code? 4 void main( ) { int i = 1, j = -1, k = 0, w, x, y, z; w = i || j ||k ; x = i && j && k ; y = i || j && k ; z = i && j && k ; printf(« w=%d x=%d y=%d z=%d »,w,x,y,z) ; } Other: 1. 2. 3. 4.

Differentiate between unary, binary and ternary operators. 4 What is precedence and associativity of operators? 2 Explain the use of manual and automatic type casting with suitable. 4 What is comment? Explain its use. 2

Mr. Kute T. B. Lecturer in Information Technology, Nashik

CPR – Question Bank Chapter 01

-2-

Related Documents