Pic Pyq
Pic Pyq
STUDY MATERIAL
PROGRAMMING
IN C
(Please Write your
our Roli Roll No.
No. immediately)
OTeQuestion No. 1 is compulsory. Attempt any two more questions from the rest.
Q 1.Answer the following:
[2x5 10]
a) Differentiate between a keyword and an identifier with examples. List the criteria
of declaring an identifier.
b) Write the steps involved from sample.c to
sample.exe.
c) What would be appropriate data type to store the following:-
i) Distance among the galaxies ii) Factorial of a 2-digit number
iii) an exclamation mark () iv) average agebf student in your class.
d) Define precedence and associativity of operators with examples.
e) What is a header file? List any three header files with their
purpose.
Q2. a) Describe various operators with the help of suitable examples.
b) Write the output of the following statements. All are integer values. [1 x5-5].
i=8;j=7; j + =i * i printf(%%d", j);
b) Write a program to find numbers and their sum between 100 to 1000 which are
divisible by 7.
Q4. a) What is a switch statement? List its disadvantages. Write a program using switch
statement.
b) Define break and continue statements with example. (3
What is the purpose of getchar() and putchar)?
C) [2
Exam Roll No. . **************
Please write your Exam Roll No.)
(b) Explain the design flow to solve the problem. flow Diagram?
(c) What is the difference between the Flow chart and Data
codes?
(d) What is the difference between ASCII and EBCDIC
included in C
(e) What is an Operator? Discuss different types of operator
language with an example for each. (5x5-25)
UNIT-I
Define Algorithm. Write the characteristic features and format of algorithm.
Q2
Discuss the technique used to design an algorithm. (12.5)
Define Flowchart. Write the advantage and symbols used in flowchart. Draw the
Q3
Flowchart to find the smallest of 3 numbers. (12.5)
UNIT-II
What do you mean by the terms Precedence and Associatively? Write a program
Q4 to find the roots of a Quadratic Equation? Find the roots for the cases when
determinant D>0, D=0 and D<0. (12.5)
Unit-III )
Entry Controlled Loop and Exist Controlled Loop in C programs. 6
Q6 (a) Describe
(b) Write a program in C, which can print the following: (6.5)
1 2 3 4 3 21
Mention the return types in function. By default a function returns which
Q7 (a)
type of a value? Give an example. (6)
(b) Describe Format Argument, Actual Argument, Function Declaration and
Function Definition. (6.5)
UNIT-IV
Q8 Explain the following:
(a Static Memory Allocation and Dynamic Memory Allocation. (3)
(b) Call by Value and Call by Reference. (3)
(c) Comparison between an array of char and a pointer to char. 3.5)
(d) Structure and union. (3)
P
(Please write your Exam Roll
No.) Exam Roll No.********
... *
END TERM EXAMINATION
SECOND SEMESTER B.TECH]MAY -JUNE 2019
Paper Code: ETCS-108 Subject: Introduction to Programmingg
(Batch 2013 Onwards)
Time: 3 Hours
Maximum Marks: 75
Note: Attempt any five questions incuding Qno.1 which is
compulsory.
Q1 Differentiate between the following (any
(a) Ternary and Bitwise operator. five): (5x5-25)
(b) External and Internal documentation.
(c) Primitive and Non Primitive data types.
(d) Loader and Linker
(e) Declaration and Definition of a variable.
() Auto, Register, static and Extern variables.
Q2 (a) Explain how strings can be stored using a multidimensional arrays?{5)
(b) Differentiate between break and continue. Write a C program to
the pattern. print
(7.5)
***********
P
Please write your roll no. immediately.
First Term Examination
Second Semester(B.Tech)
e) Why it is necessary to use '&' sign before a variable name in scanf function?
(2+2+2+2+2=10)
Q.2 Write an algorithm to generate Fibonacci series and draw the flowchart for the same.
(5+5-10)
Q.3 What is the output of the following program? (3+3+4=10)
a.4(a write a program to accept any six digit number and print the sum of all even digits ofthat
number and multiplication of odd digits.
1
23
4 56
7 8 9 10
11 12 13 14 15 (5+5)
Exam Roll No. ..e**** * * * * e * * * * * *