This document contains a class test for the subject Programming with C. It has 3 questions with multiple parts each.
1. Question 1 part a asks to identify errors in 4 C statements. Parts b, c, d ask to write short notes on hierarchy of C development, operators precedence and associativity, and a program to reverse a 5 digit number respectively.
2. Question 2 part a differentiates break and continue, part b explains else-if ladder with a program, part c explains conditional operator to check leap years, part d programs to check palindrome.
3. Question 3 part a briefly explains switch-case, part b explains while loop to print prime numbers from 1 to 300, part c
This document contains a class test for the subject Programming with C. It has 3 questions with multiple parts each.
1. Question 1 part a asks to identify errors in 4 C statements. Parts b, c, d ask to write short notes on hierarchy of C development, operators precedence and associativity, and a program to reverse a 5 digit number respectively.
2. Question 2 part a differentiates break and continue, part b explains else-if ladder with a program, part c explains conditional operator to check leap years, part d programs to check palindrome.
3. Question 3 part a briefly explains switch-case, part b explains while loop to print prime numbers from 1 to 300, part c
This document contains a class test for the subject Programming with C. It has 3 questions with multiple parts each.
1. Question 1 part a asks to identify errors in 4 C statements. Parts b, c, d ask to write short notes on hierarchy of C development, operators precedence and associativity, and a program to reverse a 5 digit number respectively.
2. Question 2 part a differentiates break and continue, part b explains else-if ladder with a program, part c explains conditional operator to check leap years, part d programs to check palindrome.
3. Question 3 part a briefly explains switch-case, part b explains while loop to print prime numbers from 1 to 300, part c
SHRI SHANKARACHARYA TECHNI CAL CAMPUS, J UNWANI , BHILAI
CLASS TEST I (EI 3rd- Sem.)
Sep. 2013 (Odd Sem.) Subject: Programming with C Max. Marks: 40 Min. Marks: 14 Time: 2 Hours Note: Attempt all questions. Part (a) is compulsory. Attempt any two out of part (b), (c) or (d) in question 1, 2 & 3.
Q.1. a) Point out errors, if any in the following c statements: 2 i) int=31.56*150; ii) m_i=rate of interest*amount in rs; iii) 3.14*r*r*h=vol_of_cycle iv) date=9 Mar 13; b) Write short on hierarchy of development of C. Explain features and characteristics. 6 c) Explain operators precedence and associativity. WAP to convert temp. into centigrade degrees. Temp. of a city in Fahrenheit is input through the K/B.
d) If a 5-digit no. is i/p through the K/B, WAP to reverse the no. 6 Q2. a) Differentiate break and continue. 2 b) Explain else-if ladder with suitable c program. 6 c) Explain conditional operator to check whether a year i/p through K/B is leap year or not. 6 d) WAP to to find whether any input number is Palindrome or not. 6 Q3. a) Briefly explain switch-case statement. 2 b) Explain While loop. WAP to print all prime nos. b/w 1 and 300. 5 c) Display the value of following series: 5 1! 2! + 3! 4! + 5! d) Print the following pattern using for loop. 5 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5