Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven):
The correct syntax for an if-statement is
C function execution always begins from
Which storage class has the default value of a variable as zero?
Relational operators always return
Which of the following is an exit-controlled loop?
Binary search works only on
break keyword is used to
In a union, memory allocated is equal to the size of
fopen("abc.txt","r") opens file in
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Write an algorithm and draw the flowchart for checking whether a number is prime or not.
Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.
Q.3 Solve both questions :
Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.
Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the use of break, continue, and goto statements with examples.
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.
Q.6 Solve both questions :
Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.
Describe the selection sort algorithm and implement it in C language.
Q.7 Solve both questions :
Explain various storage classes in C with proper examples.
Write a program to copy the contents of one file into another and explain each step of file IO.
Q.8 Solve both questions :
Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven):
The correct syntax for an if-statement is
C function execution always begins from
Which storage class has the default value of a variable as zero?
Relational operators always return
Which of the following is an exit-controlled loop?
Binary search works only on
break keyword is used to
In a union, memory allocated is equal to the size of
fopen("abc.txt","r") opens file in
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Write an algorithm and draw the flowchart for checking whether a number is prime or not.
Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.
Q.3 Solve both questions :
Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.
Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the use of break, continue, and goto statements with examples.
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.
Q.6 Solve both questions :
Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.
Describe the selection sort algorithm and implement it in C language.
Q.7 Solve both questions :
Explain various storage classes in C with proper examples.
Write a program to copy the contents of one file into another and explain each step of file IO.
Q.8 Solve both questions :
Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven):
The correct syntax for an if-statement is
C function execution always begins from
Which storage class has the default value of a variable as zero?
Relational operators always return
Which of the following is an exit-controlled loop?
Binary search works only on
break keyword is used to
In a union, memory allocated is equal to the size of
fopen("abc.txt","r") opens file in
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Write an algorithm and draw the flowchart for checking whether a number is prime or not.
Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.
Q.3 Solve both questions :
Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.
Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the use of break, continue, and goto statements with examples.
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.
Q.6 Solve both questions :
Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.
Describe the selection sort algorithm and implement it in C language.
Q.7 Solve both questions :
Explain various storage classes in C with proper examples.
Write a program to copy the contents of one file into another and explain each step of file IO.
Q.8 Solve both questions :
Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven):
The correct syntax for an if-statement is
C function execution always begins from
Which storage class has the default value of a variable as zero?
Relational operators always return
Which of the following is an exit-controlled loop?
Binary search works only on
break keyword is used to
In a union, memory allocated is equal to the size of
fopen("abc.txt","r") opens file in
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Write an algorithm and draw the flowchart for checking whether a number is prime or not.
Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.
Q.3 Solve both questions :
Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.
Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the use of break, continue, and goto statements with examples.
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.
Q.6 Solve both questions :
Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.
Describe the selection sort algorithm and implement it in C language.
Q.7 Solve both questions :
Explain various storage classes in C with proper examples.
Write a program to copy the contents of one file into another and explain each step of file IO.
Q.8 Solve both questions :
Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven):
The correct syntax for an if-statement is
C function execution always begins from
Which storage class has the default value of a variable as zero?
Relational operators always return
Which of the following is an exit-controlled loop?
Binary search works only on
break keyword is used to
In a union, memory allocated is equal to the size of
fopen("abc.txt","r") opens file in
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Write an algorithm and draw the flowchart for checking whether a number is prime or not.
Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.
Q.3 Solve both questions :
Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.
Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the use of break, continue, and goto statements with examples.
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.
Q.6 Solve both questions :
Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.
Describe the selection sort algorithm and implement it in C language.
Q.7 Solve both questions :
Explain various storage classes in C with proper examples.
Write a program to copy the contents of one file into another and explain each step of file IO.
Q.8 Solve both questions :
Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option/answer the following (Any seven question
only):
Which of the following cannot be a variable name in C?
Which of the following typecasting is accepted by C language
Which of the following is NOT possible with any 2 operators in C?
Functions can return enumeration constants in C?
C preprocessors can have compiler specific features.
How many number of pointer (*) does C have against a pointer variable declaration?
Which of the following is not possible statically in C language?
What will be the value of the following assignment expression?
(x = foo())!=1 considering foo() returns 2
Comment on the following C statement
n=1; printf("%d, %d
", 3*n, n++);
What are the elements present in the array of the following C code?
int array[5]={5};
Q.2 Solve both questions :
Explain the major components of a computer system. How does the operating system help in program execution?
Write an algorithm and flowchart to find the largest of three numbers.
Q.3 Solve both questions :
Explain the different arithmetic operators in C. Write the rules for evaluating arithmetic expressions with precedence and associativity.
Write a program to reverse a number using a loop. Explain the concept of an infinite loop with examples. Why do infinite loops occur?
Q.4 Solve both questions :
Explain array declaration and initialization with examples for 1-D and 2-D arrays. Also explain the concept of bound checking.
Write a C program to perform Binary Search on a sorted array.
Q.5 Solve both questions :
What is call by reference? How is passing an array to a function an example of call by reference? Explain with code.
Write a program that reads marks of 5 students into an array and uses a function to compute the average. Demonstrate passing an array to a function.
Q.6 Solve both questions :
Define a structure Student with name, roll, marks. Write a C program to input data for 3 students and print it.
Write a note on accessing structure elements using (a) dot operator, (b) pointer-to-structure. Give examples.
Q.7 Solve both questions :
Explain the concept of pointers in C. How are pointers defined and used? Illustrate with a program that swaps two numbers using pointers.
Write a C program using pointers to reverse an array in-place. Explain how pointers are used in the program.
Q.8 Solve both questions :
Write a recursive C program to find the factorial of a number. Also explain base case and recursive case.
Explain the Ackermann function. Write a recursive program for it. Why is it not suitable for large values?
Q.9 Write short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option/answer the following (Any seven question
only):
Which of the following cannot be a variable name in C?
Which of the following typecasting is accepted by C language
Which of the following is NOT possible with any 2 operators in C?
Functions can return enumeration constants in C?
C preprocessors can have compiler specific features.
How many number of pointer (*) does C have against a pointer variable declaration?
Which of the following is not possible statically in C language?
What will be the value of the following assignment expression?
(x = foo())!=1 considering foo() returns 2
Comment on the following C statement
n=1; printf("%d, %d
", 3*n, n++);
What are the elements present in the array of the following C code?
int array[5]={5};
Q.2 Solve both questions :
Explain the major components of a computer system. How does the operating system help in program execution?
Write an algorithm and flowchart to find the largest of three numbers.
Q.3 Solve both questions :
Explain the different arithmetic operators in C. Write the rules for evaluating arithmetic expressions with precedence and associativity.
Write a program to reverse a number using a loop. Explain the concept of an infinite loop with examples. Why do infinite loops occur?
Q.4 Solve both questions :
Explain array declaration and initialization with examples for 1-D and 2-D arrays. Also explain the concept of bound checking.
Write a C program to perform Binary Search on a sorted array.
Q.5 Solve both questions :
What is call by reference? How is passing an array to a function an example of call by reference? Explain with code.
Write a program that reads marks of 5 students into an array and uses a function to compute the average. Demonstrate passing an array to a function.
Q.6 Solve both questions :
Define a structure Student with name, roll, marks. Write a C program to input data for 3 students and print it.
Write a note on accessing structure elements using (a) dot operator, (b) pointer-to-structure. Give examples.
Q.7 Solve both questions :
Explain the concept of pointers in C. How are pointers defined and used? Illustrate with a program that swaps two numbers using pointers.
Write a C program using pointers to reverse an array in-place. Explain how pointers are used in the program.
Q.8 Solve both questions :
Write a recursive C program to find the factorial of a number. Also explain base case and recursive case.
Explain the Ackermann function. Write a recursive program for it. Why is it not suitable for large values?
Q.9 Write short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven only):
Where is a program stored and executed?
What is the output of a compiler?
Which storage class has the default value of a variable as zero?
What is the result of 5% 2 in C?
What type of array is used to store string?
Binary search works only on:
Which operator is used to access members of a structure using a pointer?
What is the output of in C?
Which function is used to open a file in C?
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Draw a flowchart to find the largest of three numbers.
Explain different storage classes in C.
Q.3 Solve both questions :
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
Explain operator precedence and associativity with examples.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
Explain the different modes of opening a file in C. Give examples.
Q.6 Solve both questions :
Write a program to perform linear search in an array.
Describe the bubble sort algorithm and write its implementation in C.
Q.7 Solve both questions :
What is the difference between call by value and call by reference? Explain with examples.
What is the scope of a variable? Explain local and global scope with examples.
Q.8 Solve both questions :
What is recursion? Write a recursive function to compute the nth Fibonacci number.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Self-Referential Structure
Compiler and Linker
Syntax and logical errors
Bitwise Operator
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven only):
Where is a program stored and executed?
What is the output of a compiler?
Which storage class has the default value of a variable as zero?
What is the result of 5% 2 in C?
What type of array is used to store string?
Binary search works only on:
Which operator is used to access members of a structure using a pointer?
What is the output of in C?
Which function is used to open a file in C?
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Draw a flowchart to find the largest of three numbers.
Explain different storage classes in C.
Q.3 Solve both questions :
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
Explain operator precedence and associativity with examples.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
Explain the different modes of opening a file in C. Give examples.
Q.6 Solve both questions :
Write a program to perform linear search in an array.
Describe the bubble sort algorithm and write its implementation in C.
Q.7 Solve both questions :
What is the difference between call by value and call by reference? Explain with examples.
What is the scope of a variable? Explain local and global scope with examples.
Q.8 Solve both questions :
What is recursion? Write a recursive function to compute the nth Fibonacci number.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Self-Referential Structure
Compiler and Linker
Syntax and logical errors
Bitwise Operator
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven only):
Where is a program stored and executed?
What is the output of a compiler?
Which storage class has the default value of a variable as zero?
What is the result of 5% 2 in C?
What type of array is used to store string?
Binary search works only on:
Which operator is used to access members of a structure using a pointer?
What is the output of in C?
Which function is used to open a file in C?
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Draw a flowchart to find the largest of three numbers.
Explain different storage classes in C.
Q.3 Solve both questions :
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
Explain operator precedence and associativity with examples.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
Explain the different modes of opening a file in C. Give examples.
Q.6 Solve both questions :
Write a program to perform linear search in an array.
Describe the bubble sort algorithm and write its implementation in C.
Q.7 Solve both questions :
What is the difference between call by value and call by reference? Explain with examples.
What is the scope of a variable? Explain local and global scope with examples.
Q.8 Solve both questions :
What is recursion? Write a recursive function to compute the nth Fibonacci number.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Self-Referential Structure
Compiler and Linker
Syntax and logical errors
Bitwise Operator
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven only):
Where is a program stored and executed?
What is the output of a compiler?
Which storage class has the default value of a variable as zero?
What is the result of 5% 2 in C?
What type of array is used to store string?
Binary search works only on:
Which operator is used to access members of a structure using a pointer?
What is the output of $ *(\&x) $ in C?
Which function is used to open a file in C?
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Draw a flowchart to find the largest of three numbers.
Explain different storage classes in C.
Q.3 Solve both questions :
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
Explain operator precedence and associativity with examples.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
Explain the different modes of opening a file in C. Give examples.
Q.6 Solve both questions :
Write a program to perform linear search in an array.
Describe the bubble sort algorithm and write its implementation in C.
Q.7 Solve both questions :
What is the difference between call by value and call by reference? Explain with examples.
What is the scope of a variable? Explain local and global scope with examples.
Q.8 Solve both questions :
What is recursion? Write a recursive function to compute the nth Fibonacci number.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Self-Referential Structure
Compiler and Linker
Syntax and logical errors
Bitwise Operator
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any
seven only):
Where is a program stored and executed?
What is the output of a compiler?
Which storage class has the default value of a variable as zero?
What is the result of 5% 2 in C?
What type of array is used to store string?
Binary search works only on:
Which operator is used to access members of a structure using a pointer?
What is the output of $ *(\&x) $ in C?
Which function is used to open a file in C?
Which of the following problems can be solved using recursion?
Q.2 Solve both questions :
Draw a flowchart to find the largest of three numbers.
Explain different storage classes in C.
Q.3 Solve both questions :
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
Explain operator precedence and associativity with examples.
Q.4 Solve both questions :
Write the differences between if, if-else, and switch statements with examples.
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
Q.5 Solve both questions :
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
Explain the different modes of opening a file in C. Give examples.
Q.6 Solve both questions :
Write a program to perform linear search in an array.
Describe the bubble sort algorithm and write its implementation in C.
Q.7 Solve both questions :
What is the difference between call by value and call by reference? Explain with examples.
What is the scope of a variable? Explain local and global scope with examples.
Q.8 Solve both questions :
What is recursion? Write a recursive function to compute the nth Fibonacci number.
What is the difference between structure and union? Explain with an example.
Q.9 Write Short notes on any two of the following:
Self-Referential Structure
Compiler and Linker
Syntax and logical errors
Bitwise Operator
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer the following (Any seven question only):
Which of the following is a valid variable name in C?
Which of these is not a valid data type in C?
Which of the following is the correct syntax for if statement?
What is the output of printf("%d", 5 + 3 * 2)?
Which header file is required to use printf()?
Which keyword is used to define a constant in C?
What is the index of the first element in an array?
Which one is the logical AND operator in C?
Which format specifier is used for printing float values?
Which of these is not a loop in C?
Q.2 Solve both questions :
Explain the structure of a C program with an example.
Describe basic data types in C with memory size.
Q.3 Solve both questions :
What is an algorithm. Write an algorithm to perform the addition of two numbers in C and draw a flowchart to represent the addition of two numbers.
Write a program to check whether a number is even or odd using if-else.
Q.4 Solve both questions :
Explain Arithmetic and Logical operators in C with example programs.
Explain Relational and Bitwise operators with example programs.
Q.5 Solve both questions :
Explain call by value and call by reference with examples.
What is the difference between library functions and user-defined functions?
Q.6 Solve both questions :
What is an array in C programming? Write advantages of using arrays. Explain a one-dimensional array with a suitable example program.
Describe the difference between character array and string.
Q.7 Solve both questions :
Write the difference Between Array and Structure in C programming.
Write the difference Between Structure and Union in C programming.
Q.8 Solve both questions :
What is a pointer? Explain pointer declaration and initialization with sample program.
What is file? Explain text file and binary file in details.
Q.9 Write short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer the following (Any seven question only):
Which of the following is a valid variable name in C?
Which of these is not a valid data type in C?
Which of the following is the correct syntax for if statement?
What is the output of printf("%d", 5 + 3 * 2)?
Which header file is required to use printf()?
Which keyword is used to define a constant in C?
What is the index of the first element in an array?
Which one is the logical AND operator in C?
Which format specifier is used for printing float values?
Which of these is not a loop in C?
Q.2 Solve both questions :
Explain the structure of a C program with an example.
Describe basic data types in C with memory size.
Q.3 Solve both questions :
What is an algorithm. Write an algorithm to perform the addition of two numbers in C and draw a flowchart to represent the addition of two numbers.
Write a program to check whether a number is even or odd using if-else.
Q.4 Solve both questions :
Explain Arithmetic and Logical operators in C with example programs.
Explain Relational and Bitwise operators with example programs.
Q.5 Solve both questions :
Explain call by value and call by reference with examples.
What is the difference between library functions and user-defined functions?
Q.6 Solve both questions :
What is an array in C programming? Write advantages of using arrays. Explain a one-dimensional array with a suitable example program.
Describe the difference between character array and string.
Q.7 Solve both questions :
Write the difference Between Array and Structure in C programming.
Write the difference Between Structure and Union in C programming.
Q.8 Solve both questions :
What is a pointer? Explain pointer declaration and initialization with sample program.
What is file? Explain text file and binary file in details.
Q.9 Write short notes on any two of the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (Any seven question only):
What is the output of the following code?
int x = 10;
x++;
printf("%d", x);Which function is used to dynamically allocate memory in C?
What is the output of the following code?
#include <stdio.h>
int main() {
char *p = 0;
*p = 'a';
printf("%c", *p);
return 0;
}What are the elements present in the array of the following C code?
int array[6] = { 5 };What will be the output of the following C code?
void main() {
int i = 0;
while (i < 10) {
i++;
printf("hi\n");
while (i < 8) {
i++;
printf("hello\n");
}
}
}What does the following declaration mean?
int (*ptr) [10];C is ______ type of programming language?
Choose the right C statement.
Consider the following integer 2D array, which is stored in memory with the base address 1400. What would be the address of the element 14? [Assume that an integer value takes 4 bytes of memory space.]
int a[3][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}};Consider the following declaration of the variables:
int x, A[5][6], *p = &A[0][0];
Which of the following is/are the correct expression(s) to access A[3][5] and assign it to x?
Explain the difference between auto and static type storage variables with suitable example codes.
Differentiate between structures and unions in C. Write a C program to detect whether the computer is little endian or big endian using unions.
Write an efficient C program to search if the integer 24 is present in the given sorted array or not. If it is present, print the index where it is found.
Explain the insertion sort algorithm and its steps using an example. Consider the array: [5, 2, 4, 6, 1, 3].
Describe the concept of pointers in C programming language. Explain how pointers work and discuss their importance in programming, particularly in memory management and efficient data manipulation.
Write a C program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.
Write a C Program to find the Euclidean distance between two points P(x, y) and Q(a, b) using structure representation of points P and Q.
Differentiate between call-by-value and call-by-reference with suitable examples.
Define arrays in C and explain their declaration and usage. Write a C program to reverse the content of an integer array without using auxiliary array.
Define implicit and explicit type casting in C. Provide code examples illustrating when each type of casting occurs and their potential side effects.
Explain the concept of nested loops. Describe how the break and continue statements alter the flow of control within C loops.
Explain the concept of algorithmic complexity and its significance in computer science. Using examples, illustrate how different algorithms exhibit various orders of complexity, such as constant time (O(1)), linear time (O(n)), logarithmic time (O(log n)), quadratic time (O(n^2)), and exponential time (O(2^n)).
The first 6 numbers of the Fibonacci series are: 0 1 1 2 3 5. Write a C program using recursion to find and print the Fibonacci series for first n terms.
Write a C program using recursion to find factorial of a given number n.
Write a C program for the following:
- Reverse a string without using strrev().
- Concatenate two strings without using strcat().
Write a C program to find result matrix after multiplying two given matrices using 2-D arrays. Check the multiplication criteria also while deriving the logic.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
What does the following declaration mean?
int *ptr [5];
The function malloc() is declared in which header file.
What is the output of:
#include<stdio.h>
int main()
{
char ch = 'Z';
printf("%d
", ch);
return 0;
}
How is an array initialized in C language?
What is the return type of the fopen() function in C?
What will be the output of the following C Code?
#include<stdio.h>
int main()
{
int x=4, y, z;
y=--x;
z=x--;
printf("%d%d%d", x, y, z);
}
The keyword used to transfer control from a function back to the calling function is.
What is the output of:
#include <stdio.h>
int main( )
{
float a = 5, b = 2;
int c,d;
c = a/b;
d = c/2;
printf("%d", d);
return 0;
}
In C, if you pass an array as an argument to a function, what actually gets passed?
How is the $3^{rd}$ element in an array accessed based on pointer notation?
Q.2 Solve both questions :
Explain entry controlled loop and exit controlled loop with flow charts and examples.
Write a C program to reverse a given multi-digit number.
Q.3 Solve both questions :
Explain break and continue keywords with suitable examples in context of managing loops.
What is storage classes in C. Write features (storage, default value, scope, life) of variables defined under each storage class.
Q.4 Solve both questions :
Write a C function for Bubble sort. Analyse the time complexity of Bubble sort for each standard cases.
Differentiate between formal argument and actual argument with an example.
Q.5 Solve both questions :
What is recursion? Write a recursive C program to generate $n^{th}$ term of the Fibonacci series.
How string is declared and initialized? Explain any four predefined string manipulation functions with examples.
Q.6 Solve both questions :
Write a C program to find result matrix after multiplying two given matrices using 2-D arrays.
Write a program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.
Q.7 Solve both questions :
Write the difference between structure and union. Compare them with the help of an example.
Write a program to copy the contents of one array into another in reverse order.
Q.8 Solve both questions :
Differentiate between call-by-value and call-by-reference with suitable examples.
Discuss conditional operator? Write a C program to find largest of three numbers using conditional operator?
Q.9 Solve both questions :
Write a C program that converts a string like "124" to an integer 124.
Write a C program using the nesting of loops to print the following pattern:
1
2 3
4 5 6
7 8 9 10
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
What does the following declaration mean?
int *ptr [5];
The function malloc() is declared in which header file.
What is the output of:
#include<stdio.h>
int main()
{
char ch = 'Z';
printf("%d
", ch);
return 0;
}
How is an array initialized in C language?
What is the return type of the fopen() function in C?
What will be the output of the following C Code?
#include<stdio.h>
int main()
{
int x=4, y, z;
y=--x;
z=x--;
printf("%d%d%d", x, y, z);
}
The keyword used to transfer control from a function back to the calling function is.
What is the output of:
#include <stdio.h>
int main( )
{
float a = 5, b = 2;
int c,d;
c = a/b;
d = c/2;
printf("%d", d);
return 0;
}
In C, if you pass an array as an argument to a function, what actually gets passed?
How is the $3^{rd}$ element in an array accessed based on pointer notation?
Q.2 Solve both questions :
Explain entry controlled loop and exit controlled loop with flow charts and examples.
Write a C program to reverse a given multi-digit number.
Q.3 Solve both questions :
Explain break and continue keywords with suitable examples in context of managing loops.
What is storage classes in C. Write features (storage, default value, scope, life) of variables defined under each storage class.
Q.4 Solve both questions :
Write a C function for Bubble sort. Analyse the time complexity of Bubble sort for each standard cases.
Differentiate between formal argument and actual argument with an example.
Q.5 Solve both questions :
What is recursion? Write a recursive C program to generate $n^{th}$ term of the Fibonacci series.
How string is declared and initialized? Explain any four predefined string manipulation functions with examples.
Q.6 Solve both questions :
Write a C program to find result matrix after multiplying two given matrices using 2-D arrays.
Write a program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.
Q.7 Solve both questions :
Write the difference between structure and union. Compare them with the help of an example.
Write a program to copy the contents of one array into another in reverse order.
Q.8 Solve both questions :
Differentiate between call-by-value and call-by-reference with suitable examples.
Discuss conditional operator? Write a C program to find largest of three numbers using conditional operator?
Q.9 Solve both questions :
Write a C program that converts a string like "124" to an integer 124.
Write a C program using the nesting of loops to print the following pattern:
1
2 3
4 5 6
7 8 9 10
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
- Choose the correct option (any seven) :
What will be the output of this C code?
#include<stdio.h>
int main()
{
char ch = 'A';
printf("%d", sizeof('A'));
return 0;
}What will be the output of this C code?
#include<stdio.h>
int main()
{
extern int i;
i = 20;
printf("%d", i);
return 0;
}What will be the output of this C code?
#include<stdio.h>
int main()
{
int i = 100;
{
int i = 0;
printf("%d", i==0);
}
return 0;
}What will be the output of this C code?
#include<stdio.h>
int main(){
int x=3, y=4, z;
z = ++x * y++;
printf("%d", z);
}In C, if you pass an array as an argument to a function, what actually gets passed?
The keyword used to transfer control from a function back to the calling function is
What will be the output of this C code?
#include<stdio.h>
int main()
{
int y=200;
const int x=y;
x=10;
printf("%d\n", x);
return 0;
}Which of the following are unary operators in C?
- !
- sizeof
- ~
- &&
How will you free the allocated memory?
Which statement will you add in the following program to work it correctly?
#include<stdio.h>
int main()
{
printf("%f", log(128.0));
return 0;
}Write a program to print all prime numbers from 1 to 100.
It is syntactically valid to use float variable as loop control variable but it is not recommended. Justify your answer regarding this statement.
Write a program to generate all combinations of 1, 2 and 3 using for loop.
Define data types in C. Discuss primitive data types in terms of memory occupied, format specifier and range.
Define calling and called functions with suitable examples. What do you mean by call-by-value and call-by-reference? Write C programs for swapping of two numbers using call-by-value and call-by-reference techniques.
Explain various types of arithmetic and logical operators in C language with the help of example. When precedence of two operators in an arithmetic expression is same, how associativity helps in identifying which operator will be evaluated first? Illustrate it with example.
Suppose that hundred numbers are entered from the keyboard into an array. The number to be searched is entered through the keyboard by the user. Write a program to find if the number to be searched is present in the array and if it is present, display the number of times it appears in the array.
What is case control structure in C? What is the reason for using break statement at the end of each case in case control block?
Explain pointer arithmetic with the help of suitable examples.
Any year is entered through the keyboard. Write a C program to determine whether the year is a leap year or not.
Explain string palindrome. Write a program in C to check whether a given string is palindrome or not.
Write a C program using the nesting of loops to print the following pattern :
*
* *
* * *
* * * *
* * * * *Define storage classes with its type in detail.
What is recursive function? Further, for given integer n, write a program in C to find the sum of the following series using recursion :
$ S = 1 + 2 + 3 + \dots + n $
Define structure and union in C with suitable examples.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
- Choose the correct alternative (any seven) :
A variable name in C should be a/an
Why do we write (int*) before malloc?
int *p = (int*) malloc(sizeof(int));
Which header file is used for reading and writing to a file?
Which of the following functions displays the keyboard character for pressed key?
What does the following declaration mean?
int (*ptr) [10];
Automatic variables are initialized to
Which of the following symbols is the type-specifier?
The && and || operators
Identify the correct sequence of steps to run a program.
An external variable is the one
Discuss about some methods or methodologies used for problem solving.
How programming utilizes different components of computer system?
What is algorithm? Give an example algorithm for any problem.
What is the difference between compilation and execution of a program?
What is the effect of warning and syntax error on program execution? What we get as an output of compilation step?
What are variables? List the 'data types' which can be associated to a variable in C language.
What is the role of 'header files' in C language? List any four with their usage.
Draw a flowchart to find the average of 10 numbers of an array.
Write the syntax for conditional operator in C. Also write the syntax for some conditional statements used in C.
List the looping constructs used in C. What are the roles of 'break' and 'continue' statements in loops? Show with examples.
Given a list of 11 numbers. Write a C program to find the median of that list.
What are functions? How are they useful? Comment on two categories in which various functions can be categorized.
Write a C program to generate Fibonacci series using function.
List three different ways to read a string from the prompt.
What are the ways of parameter passing in functions? Explain each.
Write a C program to find the largest number from an array using pointer.
What are the structures in C? How are they different from Union?
What is dynamic memory allocation? How is this achieved in C? Explain.
Write a C program to copy the content of one file into other.
How is merge sort different from other sorting algorithms?
Write a C program to create an array of structures named "STUDENT" with fields Name, Roll No, Address and Marks. Also add the code for inserting, deleting and printing any student record.
What do you mean by command line argument? Give an example.
Instructions:
- All questions carry equal marks.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer from any seven of the following:
Let x be an integer which can take a value of 0 or 1. The statement if (x == 0)x = 1; else x = 0; is equivalent to which one of the following?
A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a, b, c, d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings cannot be generated using this program?
Suppose a C program has floating constant 1.414, what is the best way to convert this 'float' data type?
What is the output of the following program?
void main(){
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d", a++);
else
printf("%d", ++a);
printf("%d", a+10);
}
What is the output of this C code?
#include<stdio.h>
void main()
{
int a = 5 * 3 + 2 - 4;
printf("%d", a);
}
What is the output of this C code?
#include<stdio.h>
void main()
{
int b = 6;
int c = 7;
int a = ++b+c--;
printf("%d", a);
}
What is the output of this C code?
#include<stdio.h>
void foo(int*);
int main()
{
int i = 10;
foo((&i)++);
}
void foo(int* p)
{
printf("%d
", *p);
}
User-defined data type can be derived by
As per C language standard, which of the following is/are not keyword(s)? Pick the best
statement:
auto, make, main, sizeof, elseif
What is the output of this C code (when 1 is entered)?
#include<stdio.h>
void main()
{
double ch;
printf ("enter a value between 1 to 2:");
scanf("%lf", &ch);
switch (ch)
{
case 1:
printf("1");
break;
case 2:
printf("2");
break;
}
}
Q.2 Solve this question :
What do you mean by pre-processor? Also explain the use of %i format specifier w.r.t, scanf() function.
Q.3 Solve this question :
Write a C program to Perform binary search on a set of given sorted numbers.
Q.4 Solve this question :
Write a C program to find the number of lines in a text file.
Q.5 Solve this question :
Explain pointer arithmetic with the help of suitable diagrams.
Q.6 Solve this question :
Explain the following bitwise operators:
(a) Bitwise AND
(b) Bitwise OR
(c) Bitwise XOR
(d) Bitwise Left Shift
Q.7 Solve this question :
What do you mean by 'call by reference'? Explain with the help of a function which swaps two numbers.
Q.8 Solve this question :
Write a C program of the following:
(a) Reverse a string without using strrev().
(b) Concatenate two strings without using strcat()
Q.9 Solve this question :
Write a 'recursive' C program to print the following:
(a) GCD of two numbers
(b) Merge-sort of a set of given numbers
Instructions:
- All questions carry equal marks.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer from any seven of the following:
Let x be an integer which can take a value of 0 or 1. The statement if (x == 0)x = 1; else x = 0; is equivalent to which one of the following?
A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a, b, c, d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings cannot be generated using this program?
Suppose a C program has floating constant 1.414, what is the best way to convert this 'float' data type?
What is the output of the following program?
void main(){
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d", a++);
else
printf("%d", ++a);
printf("%d", a+10);
}
What is the output of this C code?
#include<stdio.h>
void main()
{
int a = 5 * 3 + 2 - 4;
printf("%d", a);
}
What is the output of this C code?
#include<stdio.h>
void main()
{
int b = 6;
int c = 7;
int a = ++b+c--;
printf("%d", a);
}
What is the output of this C code?
#include<stdio.h>
void foo(int*);
int main()
{
int i = 10;
foo((&i)++);
}
void foo(int* p)
{
printf("%d
", *p);
}
User-defined data type can be derived by
As per C language standard, which of the following is/are not keyword(s)? Pick the best
statement:
auto, make, main, sizeof, elseif
What is the output of this C code (when 1 is entered)?
#include<stdio.h>
void main()
{
double ch;
printf ("enter a value between 1 to 2:");
scanf("%lf", &ch);
switch (ch)
{
case 1:
printf("1");
break;
case 2:
printf("2");
break;
}
}
Q.2 Solve this question :
What do you mean by pre-processor? Also explain the use of %i format specifier w.r.t, scanf() function.
Q.3 Solve this question :
Write a C program to Perform binary search on a set of given sorted numbers.
Q.4 Solve this question :
Write a C program to find the number of lines in a text file.
Q.5 Solve this question :
Explain pointer arithmetic with the help of suitable diagrams.
Q.6 Solve this question :
Explain the following bitwise operators:
(a) Bitwise AND
(b) Bitwise OR
(c) Bitwise XOR
(d) Bitwise Left Shift
Q.7 Solve this question :
What do you mean by 'call by reference'? Explain with the help of a function which swaps two numbers.
Q.8 Solve this question :
Write a C program of the following:
(a) Reverse a string without using strrev().
(b) Concatenate two strings without using strcat()
Q.9 Solve this question :
Write a 'recursive' C program to print the following:
(a) GCD of two numbers
(b) Merge-sort of a set of given numbers
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct alternative (any seven):
What will be the data type of result of the following operation?
(float)a * (int)b/(long)c *
(double)d)
What does the following declaration mean?
int (*ptr) [10];
Which of the following is a correct format for declaration of function?
The value obtained in the function is given back to main by using ______ keyword.
Which data type is most suitable for storing a number 65000 in a 32-bit system?
Which of the following declarations is not supported by C?
Which of the following is an invalid if-else statement?
A local variable declaration with no storage class specified is by default
Automatic variables are initialized to
The getchar() function is defined in ______ header file.
Q.2 Solve all parts :
What do you understand by the term 'problem solving'? How can programming be used to do problem solving?
Discuss about the components of computer system. How are they involved in computer programming activity?
Write the algorithm for exchanging the values of two variables.
Q.3 Solve all parts :
Differentiate between flowchart, pseudo-code and source code.
What are the outcomes of compilation of a program? Discuss in detail.
What are constants? List the types of constants as defined in C language.
Q.4 Solve all parts :
What are the libraries? How are they different from header files?
What is an array? Write a C program to find the average of 10 numbers of an array.
What do you understand by the operator precedence? Explain.
Q.5 Solve both questions :
Define storage classes of C with some appropriate examples.
What is branching? What are the possible types of branching and the C statements used for such type of branching? Give a detailed explanation with example.
Q.6 Solve both questions :
Write a C program to calculate 12!/8. The operation is factorial of 12, divided by 8. Also comment by examine whether the algorithm used is efficient.
What is type casting? Explain its classification through examples.
Q.7 Solve all parts :
Give the purpose, proper syntax and other variants of 'getch()' and 'gets()' functions.
How can an array of numbers be passed to function as parameter? Write an example C program in support.
What is dynamic memory allocation in C?
Q.8 Solve both questions :
Differentiate between the following:
(i) Structures and Union
(ii) Formatted and Unformatted data files
What is a file? List different operations performed on file. How are they achieved? Explain.
Q.9 Solve all parts :
Write a C program to create an array of structures named "STUDENT" with fields, Name, Cell no, Address, and Marks. How to show any student record using this structure?
Which of the sorting algorithm is better than other and why? Explain.
Write C program for merge sort algorithm.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct alternative (any seven):
What will be the data type of result of the following operation?
(float)a * (int)b/(long)c *
(double)d)
What does the following declaration mean?
int (*ptr) [10];
Which of the following is a correct format for declaration of function?
The value obtained in the function is given back to main by using ______ keyword.
Which data type is most suitable for storing a number 65000 in a 32-bit system?
Which of the following declarations is not supported by C?
Which of the following is an invalid if-else statement?
A local variable declaration with no storage class specified is by default
Automatic variables are initialized to
The getchar() function is defined in ______ header file.
Q.2 Solve all parts :
What do you understand by the term 'problem solving'? How can programming be used to do problem solving?
Discuss about the components of computer system. How are they involved in computer programming activity?
Write the algorithm for exchanging the values of two variables.
Q.3 Solve all parts :
Differentiate between flowchart, pseudo-code and source code.
What are the outcomes of compilation of a program? Discuss in detail.
What are constants? List the types of constants as defined in C language.
Q.4 Solve all parts :
What are the libraries? How are they different from header files?
What is an array? Write a C program to find the average of 10 numbers of an array.
What do you understand by the operator precedence? Explain.
Q.5 Solve both questions :
Define storage classes of C with some appropriate examples.
What is branching? What are the possible types of branching and the C statements used for such type of branching? Give a detailed explanation with example.
Q.6 Solve both questions :
Write a C program to calculate 12!/8. The operation is factorial of 12, divided by 8. Also comment by examine whether the algorithm used is efficient.
What is type casting? Explain its classification through examples.
Q.7 Solve all parts :
Give the purpose, proper syntax and other variants of 'getch()' and 'gets()' functions.
How can an array of numbers be passed to function as parameter? Write an example C program in support.
What is dynamic memory allocation in C?
Q.8 Solve both questions :
Differentiate between the following:
(i) Structures and Union
(ii) Formatted and Unformatted data files
What is a file? List different operations performed on file. How are they achieved? Explain.
Q.9 Solve all parts :
Write a C program to create an array of structures named "STUDENT" with fields, Name, Cell no, Address, and Marks. How to show any student record using this structure?
Which of the sorting algorithm is better than other and why? Explain.
Write C program for merge sort algorithm.
Instructions:
- All questions carry equal marks.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer (any seven):
Which of these, best describes an array?
How do you initialize an array in C?
When does the segmentation fault occur?
What is the output of the following program?
void main(){
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d", a++);
else
printf("%d", ++a);
printf("%d", a+10);
}
What is the output of the following code?
void main()
{
int i;
i=0;
if(i=15,10,5)
printf("Programming %d",i);
else
printf("Skills %d",i);
getch();
}
What will be printed as the result of the operation below?
main()
{
char s1[]="Cisco";
char s2[]="systems";
printf ("%s", s1);
}
Process of inserting an element in stack is called
Consider the following segment of C-code:
int j, n;
j=1;
while (j<=n)
j=j*2;
The number of comparisons made in the execution of the loop for any n>0 is: (Base of log is
2 in all options)
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is
What is the output of following program?
#include <stdio.h>
int main()
{
int a=1;
int b=1;
int c=a || --b;
int d=a-- && --b;
printf("a=%d, b=%d, c=%d, d=%d", a, b, c, d);
return 0;
}
Q.2 Solve this question :
How array and pointers are related? Explain with the help of suitable diagrams.
Q.3 Solve both questions :
Write a C program to count the number lines input by the user.
Explain the difference between call by reference and call by value with the help of a suitable example.
Q.4 Solve this question :
With the help of an example, differentiate between static and dynamic memory allocations.
Q.5 Solve this question :
What are library functions and their users in C language? Can we write our own functions and include them in C library?
Q.6 Solve both questions :
Write a "recursive" C program to print—
(a) Fibonacci series;
(b) factorial of a given
number.
Q.7 Solve this question :
Write the differences between structure and union. Compare them with the help of an example.
Q.8 Solve this question :
Write a C program to convert an infix expression into postfix expression. In particular, an infix expression: $(1-2)*(4+5)$ will have postfix expression: $12-45+*$.
Q.9 Solve this question :
Write a C program to illustrate reading of data from a file.
Instructions:
- All questions carry equal marks.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer (any seven):
Which of these, best describes an array?
How do you initialize an array in C?
When does the segmentation fault occur?
What is the output of the following program?
void main(){
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d", a++);
else
printf("%d", ++a);
printf("%d", a+10);
}
What is the output of the following code?
void main()
{
int i;
i=0;
if(i=15,10,5)
printf("Programming %d",i);
else
printf("Skills %d",i);
getch();
}
What will be printed as the result of the operation below?
main()
{
char s1[]="Cisco";
char s2[]="systems";
printf ("%s", s1);
}
Process of inserting an element in stack is called
Consider the following segment of C-code:
int j, n;
j=1;
while (j<=n)
j=j*2;
The number of comparisons made in the execution of the loop for any n>0 is: (Base of log is
2 in all options)
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is
What is the output of following program?
#include <stdio.h>
int main()
{
int a=1;
int b=1;
int c=a || --b;
int d=a-- && --b;
printf("a=%d, b=%d, c=%d, d=%d", a, b, c, d);
return 0;
}
Q.2 Solve this question :
How array and pointers are related? Explain with the help of suitable diagrams.
Q.3 Solve both questions :
Write a C program to count the number lines input by the user.
Explain the difference between call by reference and call by value with the help of a suitable example.
Q.4 Solve this question :
With the help of an example, differentiate between static and dynamic memory allocations.
Q.5 Solve this question :
What are library functions and their users in C language? Can we write our own functions and include them in C library?
Q.6 Solve both questions :
Write a "recursive" C program to print—
(a) Fibonacci series;
(b) factorial of a given
number.
Q.7 Solve this question :
Write the differences between structure and union. Compare them with the help of an example.
Q.8 Solve this question :
Write a C program to convert an infix expression into postfix expression. In particular, an infix expression: $(1-2)*(4+5)$ will have postfix expression: $12-45+*$.
Q.9 Solve this question :
Write a C program to illustrate reading of data from a file.