JNTU

JNTU MCA 2018 COMPUTER PROGRAMMING Previous Question Paper (January - 2018 - R13)

MCA | 2018 | I | R13 | January - 2018

Answer PaperPaper Code: 811ACMaximum Marks: 60Time: 3hrs

Note: This question paper contains two parts A and B. Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 8 marks and may have a, b, c as sub questions.

Part A

1.a

Write about precedence and associativity of operators.

4 marks

Answer

Operator precedence determines the order in which different operators are evaluated in an expression containing multiple types of operators. Operators with higher precedence are evaluated before those with lower precedence. For example, in the expression 5 + 3 * 2, the multiplication operator (*) has higher precedence than addition (+), so it is evaluated first, resulting in 11.

Operator associativity defines the direction of evaluation (left-to-right or right-to-left) when an expression contains multiple operators of the same precedence level. Most operators, such as addition, subtraction, multiplication, and division, are left-associative, meaning they are evaluated from left to right. Assignment operators and unary operators are typically right-associative, meaning they are evaluated from right to left.

Understanding these rules is essential for predicting the outcome of complex expressions and ensuring that code executes as intended by the programmer.

1.b

What are the preprocessor commands?

4 marks

Answer

Preprocessor commands, often called directives, are instructions to the C preprocessor that are executed before the actual compilation of the source code begins. These commands always start with a hash symbol (#) and are not terminated by a semicolon.

Common preprocessor directives include:

  • Macro Substitution (#define): Used to define constants or macros to replace specific tokens in the source code.
  • File Inclusion (#include): Used to insert the contents of another file, such as header files, into the current source file.
  • Conditional Compilation (#if, #ifdef, #ifndef, #else, #elif, #endif): Allows the compiler to selectively compile specific sections of code based on defined conditions.
  • Pragma Directives (#pragma): Provides additional information to the compiler, such as specific optimization settings or memory alignment, which are implementation-defined.
  • Error and Line Control (#error, #line): Used to generate custom error messages during compilation or to reset line numbering for debugging purposes.
1.c

What are the applications of arrays?

4 marks

Answer

Sign in to view the complete answer paper.

1.d

Compare structures with unions.

4 marks

Answer

Sign in to view the complete answer paper.

1.e

What are the file status functions?

4 marks

Answer

Sign in to view the complete answer paper.

Part B

28 marks
a

Explain various arithmetic operators along with example programs.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write about type conversions.

4 marks

Answer

Sign in to view the complete answer paper.

OR
38 marks
a

Explain various computer languages.

4 marks

Answer

Sign in to view the complete answer paper.

b

What is an identifier?

4 marks

Answer

Sign in to view the complete answer paper.

4

Write a C Language program to find whether the given number is prime or not.

8 marks

Answer

Sign in to view the complete answer paper.

OR
5

Explain about storage classes.

8 marks

Answer

Sign in to view the complete answer paper.

6

Write a program to multiply two dimensional matrices.

8 marks

Answer

Sign in to view the complete answer paper.

OR
7

Write a program to demonstrate pointers of functions.

8 marks

Answer

Sign in to view the complete answer paper.

88 marks
a

Explain about bit fields.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write about enumerated types.

4 marks

Answer

Sign in to view the complete answer paper.

OR
9

Explain about command line arguments.

8 marks

Answer

Sign in to view the complete answer paper.

10

Write a program to read text file and count number of uppercase letters, lower case letters, digits, special characters.

8 marks

Answer

Sign in to view the complete answer paper.

OR
11

Write a program to copy the contents of one file to another file.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of COMPUTER PROGRAMMING from JNTU for MCA 2018 I, January - 2018, R13.

For the question paper without answers, switch to the Question Paper tab.

Other papers in COMPUTER PROGRAMMING

Loading Question Papers

Fetching data from database...