JNTU

JNTU B.Tech I Year COMPUTER PROGRAMMING IN C Previous Question Paper (October/November - 2020 - R16)

B.Tech | I Year | I Semester | R16 | October/November - 2020

Answer PaperPaper Code: 131ADMaximum Marks: 75Time: 2 hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Explain in detail about C-Tokens.

7 marks

Answer

C-tokens are the smallest individual units of a C program that are meaningful to the compiler. The entire source code is parsed into these tokens during the compilation process. They are categorized into the following types:

  • Keywords: Reserved words with fixed meanings, such as int, float, if, and while, which cannot be used as identifiers.
  • Identifiers: Names given to variables, functions, arrays, or structures. They must start with a letter or underscore and contain only letters, digits, or underscores.
  • Constants: Fixed values that do not change during program execution, including integer constants (e.g., 10), floating-point constants (e.g., 3.14), character constants (e.g., 'A'), and string literals (e.g., "Hello").
  • Strings: A sequence of characters enclosed in double quotes, automatically terminated by a null character (\0).
  • Operators: Symbols that perform arithmetic, logical, relational, or bitwise operations, such as +, -, *, /, ==, and &&.
  • Special Symbols: Characters with specific syntactic roles, such as brackets [], parentheses (), braces {}, commas ,, and semicolons ;.
b

Explain about operator precedence and associativity.

8 marks

Answer

Operator precedence and associativity define the order in which expressions are evaluated when multiple operators are present.

Operator Precedence: This determines the priority of operators. When an expression contains different types of operators, the one with higher precedence is evaluated first. For example, in the expression 5 + 3 * 2, the multiplication operator (*) has higher precedence than addition (+), so it is performed first, resulting in 11 rather than 16.

Operator Associativity: This determines the direction of evaluation when operators in an expression have the same precedence. Associativity can be either left-to-right or right-to-left.

  • Left-to-Right: Most binary operators, such as +, -, *, and /, follow this rule. For instance, 10 - 5 - 2 is evaluated as (10 - 5) - 2 = 3.
  • Right-to-Left: Unary operators (like !, ++, --) and assignment operators (=, +=) follow this rule. For example, in the expression a = b = 5, the assignment is performed from right to left, assigning 5 to b, and then b to a.

Understanding these rules is essential for writing predictable code and avoiding logical errors in complex expressions.

215 marks
a

Explain 2-dimensional arrays with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

List and explain storage classes in detail.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Discuss about String Input / Output Functions with example programs.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail about Memory Allocation Functions with examples.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Explain in detail about Nested Structures with an example program.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about typedef and enumeration with an example.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write about File Positioning functions.

7 marks

Answer

Sign in to view the complete answer paper.

b

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

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain in detail about Iterative Control Statements in detail.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about Hexadecimal number system with an example.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Write a program to implement binary search.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain about inter function communication in detail.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Define Pointer and Write a program to implement pointer to function.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain string manipulation functions.

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 IN C from JNTU for B.Tech EIE I Year I Semester, October/November - 2020, R16.

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

Other papers in COMPUTER PROGRAMMING IN C

Loading Question Papers

Fetching data from database...