JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2020 COMPUTER PROGRAMMING USING C Previous Question Paper (October/November - 2020 - R17)
Answer any five questions. All questions carry equal marks.
Main
Discuss about computer environments.
Answer
A computer environment refers to the hardware, software, and network infrastructure that allows a computer to function and execute programs. It typically consists of three main layers:
- Hardware Environment: The physical components including the CPU, memory (RAM), storage devices, and input/output peripherals that provide the raw computing power.
- Software Environment: The operating system (OS) and system software that manage hardware resources and provide a platform for application software to run. It includes compilers, interpreters, and libraries.
- Development/Execution Environment: The specific setup used by programmers, such as an Integrated Development Environment (IDE), which includes a text editor, compiler, linker, and debugger, facilitating the transformation of source code into executable machine code.
What is type conversion? Explain with an example.
Answer
Type conversion is the process of changing a value from one data type to another. In C, this is categorized into two types:
- Implicit Type Conversion (Type Promotion): Performed automatically by the compiler when different data types are used in an expression. The compiler promotes smaller data types to larger ones to prevent data loss (e.g., char or short to int, or int to float).
- Explicit Type Conversion (Type Casting): Performed manually by the programmer using the cast operator (type) to force a conversion, often used to truncate values or perform specific division.
Example:
float b = 5.5;
float result = (float)a / b;
In this example, the variable a is explicitly cast to a float before division, ensuring floating-point division is performed rather than integer division.
What is preprocessor? Explain any four preprocessor commands.
Answer
Sign in to view the complete answer paper.
Write a program to demonstrate recursive functions.
Answer
Sign in to view the complete answer paper.
What are the common features of arrays and pointers.
Answer
Sign in to view the complete answer paper.
What is a pointer? Explain how arrays are managed using pointers.
Answer
Sign in to view the complete answer paper.
Explain nested structures.
Answer
Sign in to view the complete answer paper.
Write a program to demonstrate command-line arguments.
Answer
Sign in to view the complete answer paper.
Explain the following functions.
rewind ( )
Answer
Sign in to view the complete answer paper.
fseek ( )
Answer
Sign in to view the complete answer paper.
ftell ( )
Answer
Sign in to view the complete answer paper.
fopen ( )
Answer
Sign in to view the complete answer paper.
Explain the structure of C program.
Answer
Sign in to view the complete answer paper.
List out the operators in C.
Answer
Sign in to view the complete answer paper.
Explain in detail about control structure in C.
Answer
Sign in to view the complete answer paper.
What are arrays? Explain its advantages and disadvantages. What are types of arrays?
Answer
Sign in to view the complete answer paper.
Write a C program for addition of two given matrices.
Answer
Sign in to view the complete answer paper.