Académique Documents
Professionnel Documents
Culture Documents
HYDERABAD
I YEAR B.TECH 1ST MID TERM EXAMINATION
COMPUTER PROGRAMMING AND DATA STRUCTURES - 07A1EC01
UNIT-1
2. Define algorithm and flow chart. Explain basic symbols used in flowchart. [5 M]
4. What is type casting? How C language supports explicit and implicit type casting?
[5 M]
5. What is constant? Explain different types of constants available in C Language?
[5 M]
6. How Constants are declared in C language? [5 M]
9.a) Explain how user defined data types can be defined in C Language?
b) Distinguish between upward casting and downward casting? [5 M]
13. What is an identifier? What are the rules for defining identifierin ANSI C? How
many types of identifiers are there? [5 M]
14. What is a data type? Discuss about various data types and their sizes? [5 M]
Contd…2
::2::
17.a) What is the difference between post incremental /decrement and pre increment /
decrement?
b) What is shorthand assignment? Explain about short hand assignment operators
available in C. [5 M]
19. Write an algorithm and draw a flow chart to read three variable values and print
greatest of given three values. [5 M]
20. Write an algorithm and draw flowchart to print multiplication table for the given
number n. [5 M]
21. List and explain steps involved in creating and running c programs. [5 M]
22. What is a variable? Explain about variable declaration and variable initialization.
[5 M]
23.a) Distinguish between defined constants and memory constants?
b) Distinguish between character constants and string constants? [5 M]
24. Explain about expression evaluation in C language? What are the rules of type
conversion? [5 M]
25.a) Define stream? What is the difference between binary stream and text stream?
b) Explain about “format control string” used with printf() and scanf() functions?
[5 M]
26. Define associativity? How many types of associativity are there? Give examples
explain about implicit. [5 M]
28. Draw a flowchart and Write a C program that changes a temperature reading from
Fahrenheit to clesius using following formula: Celsius = (100/180)*(Fahrenheit-32)
[5 M]
29. What is selection? Explain about C constructs available for two-way selection and
multi-way selection? Give example programs. [5 M]
30. Explain concept of a loop? Explain difference between pretest and post-test loops?
Discuss about C looping constructs. [5 M]
Contd…3
::3::
31. Compare and contrast between loop constructs available in C language? Write
sample programs? [5 M]
32. Draw a flow chart and write a C program to reverse a given number n. [5 M]
34. Write short notes on If, nested-if statement, else-if ladder and Switch statement?
[5 M]
35. Compare else-if ladders and switch statement with an example program? [5 M]
36. What is the difference between entry controlled and exit controlled statements in C?
Explain C constructs coming under these category? [5 M]
37. Explain importance and syntax of for statement and draw a flowchart. Illustrate
usage of for statement with a sample program. [5 M]
38. Write a algorithm, flowchart and C program to find average of first ‘n’ numbers
using for loop? [5 M]
39. Draw a flow chart and write a C program to print first n Fibonacci numbers using
do.. while loop? [5 M]
40. Explain about importance of break, continue and goto statements in C language?
[5 M]
41.a) Write a C program in swap given two numbers stored in tow variables without help
of third variable.
b) Why usage of ‘goto’ statement is restricted in structured programs? [5 M]
*****
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY
HYDERABAD
I YEAR B.TECH 1ST MID TERM EXAMINATION
C PROGRAMMING & DATA STRUCTURES - 07A1EC01
UNIT-II
4. What are different parameter passing techniques in C? Explain and give examples.
[5 M]
5. Distinguish between call by value and call by reference? Give examples. [5 M]
7. What is scope and extent? Discuss about scope and extent of different storage class
variables? [5 M]
8. What is the importance of static storage class and extern storage class? Explain with
sample code? [5 M]
11.a) What is the difference between local scope and global scope? Explain with an
example?
b) Distinguish between actual arguments and formal arguments in a function. [5 M]
14.a) Main is a user-defined function. How does it differ from other user-defined
functions?
b) What is significance and structure of function declaration? Explain. [5 M]
15. What is recursion? What are advantages and drawbacks of recursion? [5 M]
16. Write recursive and non-recursive function in C language to find GCD of given two
numbers. [5 M]
17. Explain types of functions classified based on return values and parameters with
examples. [5 M]
18.a) Explain top-down design approach. How C language supports top-down approach.
b) Explain about structure of function definition? [5 M]
19. Define Scope? Explain concept of scope in global area and blocks? Give an
example. [5 M]
20.a) Distinguish between auto storage class and Register Storage class.
b) Distinguish between extern storage class and global storage class. [5 M]
24. Define recursion? Compare recursive function advantages and drawbacks with non-
recursive functions? [5 M]
25. Write recursive and non-recursive functions in C language to print nth number in
the Fibonacci series. [5 M]
26. What is Towers of Hanoi problem? Why non-recursive solution is inefficient for
Towers of Hanoi problem? Give recursive function. [5 M]
Contd…3
::3::
28. Write a function Prime that returns if its argument is a prime number and returns
zero otherwise. [5 M]
29. What is preprocessor? What are called preprocessor directives? Explain about
preprocessor directives. [5 M]
31. Explain File inclusion and Conditional Compilation directives with examples. [5 M]
33.a) What is the difference between a constant defined using #define and ‘const’
keyword?
b) How user defined data types are defined using ‘typedef’ and ‘#define’. [5 M]
34. What are the uses of macros. With an example explain how nested macros can be
defined? [5 M]
39.a) Write a nested macro that gives the minimum of three values?
b) How Can we define nested functions? [5 M]
40. Explain about standard library functions used to read/print data from/to stdinput
/stdoutput devices. [5 M]
*****