Download AKTU (Dr. A.P.J. Abdul Kalam Technical University (AKTU), formerly Uttar Pradesh Technical University (UPTU)) B-Tech 1st Semester (First Semester) 2018-2019 Programming For Problem Solving Question Paper
Paper1d:[ 110111 I 1101111111.; [ [ I 1 1
17m: 3 Hours
B.TECH.
(SEM I) THEORY EXAMINATION 2018-19
PROGRAMMING FOR PROBLEM SOLVING
l
I I
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
11]
Total Math: 100
SECTION A
1. Attempt all questions in brief. 2 x 10 = 20
Q11 Question Marks CO
:1 What is the difference between compiler and Interpreter? 2 501
b. What are the good characteristics of an algorithm? 2 C01
c, What do you mean by scope and lifetime of a variable? 2 C01
d. Write a recursive function in C, which takes an input from user to 2 C03
calcu1ale a factorial using the recursion concept
6? How to use break statement in C? Explain with some sort of coda. 2 C03
f What do you mean by precedence and associativity wh?e solving some 2 CO?
arithmetic expressions?
3. While compiling a code, write the name of two syntax and two logical 2 ?301
errors ?
h. What 15 an array? In which s1tuation arm 5 advantageous over linked 2 EO-?f_
i1st'? ? ? 33-5?
i What is lmked list?? Write the self Eeferential stmcture of a node in
l1nked list? 1
j Write the difference between sfr?cturc and union \ ~?? 12? ' C05
k. , Draw the memory hiem??ct? structure of computer system. I 2 cm
SECTION B
2. Attempt any three of the following: ? >
:1, Explain linear seaJch and binary search techniqugfd?searchmg an item 10 C04
111 a given array. Also mite the complexity for each "searching technique
b. A certain grade of steel 15 graded accordmg to the following conditions:10 C03
1. Hardness must be greater than 59 7
ii, CaIbon content must be less than , 57?
111 Tensile strength must be less {ban 5600
The grades are as follows: H
Grade 15 10 11' all the thrc: cond1t10ns are met
Grade IS 9 if cond1tion_(1') and (ii) are met
Grade 1s 8 1f conditiqn (11) and(i'1'1) are met
Grade is 7 1f conditioit (i) and (111) an met
Grade is 6 if only one condition is met.
Grade 15 5 if none of the conditions are met.
Write a program, which will require the user to give values of hardness,
carbon content and tensile strength of the steel under consideration and
output the grade of the steel.
c. What do you mean by call by value and call by reference? Write an 10 C05
algonthm for swappmg two numbers us1ng call by reference technique.
Also write a C program for the above stated aiggithm.
d. Explain Selection sort technique for sorting problem, Also write an 10 C02
' algorithm for selection sort Sort the following numbers using selection
sort technique. 2654,93,] 7,77,31,44,55,20
e. Write a short note on following preprocessor directives with example: 10 CO5
1. Macro Expansion 11. File Inclusion
SECTION C
3. Attempt any one part of the following:
a. Describe the basic components of computer system with neat and clean 10 C01
block diagram. What do you mean by operating system? Ex
11 De?ned data types in C. Discuss primitive data types in terms of 10 C01
memmloccugied, format speci?er and range:
4. Attempt any one part of the following:
a. Explain various types of arithmetic operators in C language with help of 10 C01
example. When precedence of two operators in an mimetic expression
is same, how associat ivity helps 1n identifying \a'fhjc? operator wil' be
evaluated ?rst. Illustrate 11 with the examglew 4:
b. What 15 case control structure in C.. 9 WhaL 15' me reason for using break 10 C0?
statement at the end of each case in case g?ntroi block? " ?
S. Attempt any one part of the follmnE: V, ?l ?., N
Qnt ? 'jQuestion g I?Mmk CO
_ ?7, 3 ' 31 h" S
a. Write the syntax formagiffsjr while, do while and for loops Write a 10 CD3
program 111 C to multii?yfa matrix of dimension 4?4 and store theJesult
in another matrix ? ,- :_
11 What IS a funct10n?Why programmers use functions 111 code? While 10 C04
executing a function how the values are passed betweje? calling and
called environment?
6. Attempt any one part of the following: ?1?
a. I Write shon notes on following. ~; 10 C05
I l. Enumerated Data Type 1
11 l 2 gm
b. What do you mean by order of complex1ty7 Explain various notions to 10 C02
gpresent order of complexmvwnb diagram
7. Attempt any one part of the following:
a. What is dynamic memory allocation? Explain the callocO, malloco, 10 C05
reallocO and ?ed) functions in detail. What is lifetime of a vanablc,
which is created dynamicaliy?
b, Explain command line arguments in C with the help of example 10 C05
This post was last modified on 29 January 2020