JNTU
JNTU MCA 2018 COMPUTER PROGRAMMING USING C Previous Question Paper (June/July - 2018 - R17)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.
Part A
What are the different data-types in C?
Answer
Data types in C define the type and size of data a variable can hold. They are categorized into:
- Primary (Basic) Data Types: Includes int (integer), char (character), float (single-precision floating point), and double (double-precision floating point).
- Derived Data Types: These are constructed from primary types, such as arrays, pointers, structures, and unions.
- Enumerated Data Type: Defined using the enum keyword to assign names to integral constants.
- Void Type: Represents the absence of a value, typically used for function return types or generic pointers.
List out some mathematical functions.
Answer
Mathematical functions in C are defined in the math.h header file. Common functions include:
- sqrt(x): Returns the square root of x.
- pow(x, y): Returns x raised to the power of y.
- abs(x): Returns the absolute value of an integer.
- ceil(x): Returns the smallest integer greater than or equal to x.
- floor(x): Returns the largest integer less than or equal to x.
- sin(x), cos(x), tan(x): Trigonometric functions that accept arguments in radians.
What are advantages and disadvantages of pointers?
Answer
Sign in to view the complete answer paper.
What is data conversion?
Answer
Sign in to view the complete answer paper.
Write about method for opening a file.
Answer
Sign in to view the complete answer paper.
Part B
Discuss about computer systems.
Answer
Sign in to view the complete answer paper.
Explain the procedure to create and run the programs.
Answer
Sign in to view the complete answer paper.
Discuss about C tokens.
Answer
Sign in to view the complete answer paper.
Explain operator precedence.
Answer
Sign in to view the complete answer paper.
Differentiate between While and Do-While.
Answer
Sign in to view the complete answer paper.
Compare goto, break, continue.
Answer
Sign in to view the complete answer paper.
What is recursion? Explain with an example program.
Answer
Sign in to view the complete answer paper.
What are storage classes?
Answer
Sign in to view the complete answer paper.
How do you initialize 2-dimensional array? How do you pass on 2-dimensional array as argument to a function?
Answer
Sign in to view the complete answer paper.
Explain array of pointers.
Answer
Sign in to view the complete answer paper.
Explain passing array as an argument to a function.
Answer
Sign in to view the complete answer paper.
Write a C program to print the smallest and largest elements in an array.
Answer
Sign in to view the complete answer paper.
What is the enumerated data-type? List down the conditions for using enumerated data-type in a program.
Answer
Sign in to view the complete answer paper.
Write a C program to sort strings.
Answer
Sign in to view the complete answer paper.
Explain structure initialization and array of structures.
Answer
Sign in to view the complete answer paper.
What are command-line arguments?
Answer
Sign in to view the complete answer paper.
What is a file management? What are the modes of opening a file?
Answer
Sign in to view the complete answer paper.
Explain different ways of accessing files.
Answer
Sign in to view the complete answer paper.
Explain different file input, output functions.
Answer
Sign in to view the complete answer paper.
Write a program to create a file to store and retrieve strings using fputs() and fgets().
Answer
Sign in to view the complete answer paper.