Вы находитесь на странице: 1из 6

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY

HYDERABAD
I YEAR B.TECH 1ST MID TERM EXAMINATION
COMPUTER PROGRAMMING AND DATA STRUCTURES - 07A1EC01

UNIT-1

1. Explain structure of a C program and write a sample C program. [5 M]

2. Define algorithm and flow chart. Explain basic symbols used in flowchart. [5 M]

3. Discuss about primitive data types available in C language? [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]

7. What are the rules to be followed in declaring identifiers in C Language? [5 M]

8. Define precedence and Associativity? Discuss about precedence and associativity


of various C operators? [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]

10. Explain how expressions are evaluated in C Language? [5 M]

11. List and explain steps in development of C program using flowchart. [5 M]

12. Explain about Structure of a C program. [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]

15.a) Distinguish between declaration and definition? Give an example?


b) Explain about logical operators available in C language. [5 M]

16.a) Explain about conditional operator?


b) Explain about assignment operators available in C language? [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]

18. What bit-wise operators available in C Language? Explain with examples. [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]

27. Define Type conversion? What is conversion Rank? Distinguish between up


casting and down casting? [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]

33. Explain about unconditional statements with examples? [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

1. Define structured programming? Is C language structured programming language?


Justify your answer. [5 M]

2. What is a function? Distinguish between Library function and user defined


functions? [5 M]

3. What is User-defined function? What are the advantages of user-defined functions?


Write a sample function. [5 M]

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]

6. Explain about various storage classes available in C? [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]

9. Discuss about various applications for using appropriate storage classes of C


language? [5 M]

10. What is the structure of user-defined function? Distinguish between function


declaration and function definition. [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]

12.a) Distinguish between actual and formal arguments?


b) Distinguish between automatic and static variables? [5 M]

13. Compare the following


a) Global variables vs Local variables
b) Auto variables vs Static variables. [5 M]
Contd…2
::2::

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]

21.a) With an example explain non-recursive definition and recursive definition of a


function.
b) Explain usage of getch, getchar, getche library functions. [5 M]

22.a) Discuss about standard library functions to generate random numbers in C.


b) Explain about floor , round and ceiling functions available in math.h. [5 M]

23.a) What is difference between header file and c file.


b) How standard functions are used in C programs. [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::

27.a) Can main function call itself? Justify you answer.


b) What are the advantages of using header files in C language. [5 M]

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]

30. Explain about Macro substitution directives with examples. [5 M]

31. Explain File inclusion and Conditional Compilation directives with examples. [5 M]

32. Explain about compiler control directives? [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]

35.a) Explain the role of C preprocessor.


b) What is a macro and how it is different from a C variable name? [5 M]

36.a) What are the advantages of using macro definitions in a program?


b) What is conditional Compilation? How does it help a programmer? [5 M]

37.a) Distinguish between #ifdef and #if directives.


b) Explain importance of #pragma directive. [5 M]

38.a) When does a programmer use #include directive?


b) Explain uses of #define directive? [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]
*****

Вам также может понравиться