JNTU
JNTU MCA 2018 COMPUTER PROGRAMMING Previous Question Paper (January - 2018 - R13)
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
Write about precedence and associativity of operators.
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.
What are the preprocessor commands?
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.
What are the applications of arrays?
Answer
Sign in to view the complete answer paper.
Compare structures with unions.
Answer
Sign in to view the complete answer paper.
What are the file status functions?
Answer
Sign in to view the complete answer paper.
Part B
Explain various arithmetic operators along with example programs.
Answer
Sign in to view the complete answer paper.
Write about type conversions.
Answer
Sign in to view the complete answer paper.
Explain various computer languages.
Answer
Sign in to view the complete answer paper.
What is an identifier?
Answer
Sign in to view the complete answer paper.
Write a C Language program to find whether the given number is prime or not.
Answer
Sign in to view the complete answer paper.
Explain about storage classes.
Answer
Sign in to view the complete answer paper.
Write a program to multiply two dimensional matrices.
Answer
Sign in to view the complete answer paper.
Write a program to demonstrate pointers of functions.
Answer
Sign in to view the complete answer paper.
Explain about bit fields.
Answer
Sign in to view the complete answer paper.
Write about enumerated types.
Answer
Sign in to view the complete answer paper.
Explain about command line arguments.
Answer
Sign in to view the complete answer paper.
Write a program to read text file and count number of uppercase letters, lower case letters, digits, special characters.
Answer
Sign in to view the complete answer paper.
Write a program to copy the contents of one file to another file.
Answer
Sign in to view the complete answer paper.