ppsgtupaper
ppsgtupaper
/Seat No_______________
Marks
Q.1 (a) Write an algorithm to check whether the entered number is Even or Odd. 03
(b) Describe various symbols used for preparing flow chart. 04
(c) Explain different type of operators used in c language with their precedence and 07
associativity.
Q.2 (a) Differentiate: Exit controlled Loop and Entry controlled Loop 03
(b) Explain: 04
a) break statement
b) continue statement
(c) Write a C program to find factorial of a number. 07
OR
(c) Construct a C program to swap the values of two integers with use of only two 07
variables.
Q.3 (a) Demonstrate the use of conditional operator statement with an example. 03
(b) Explain the structure of switch case statement. 04
(c) Write a program to print the triangle shown below. 07
1
10
101
1010
10101
OR
Q.3 (a) Write a program to check whether entered character is vowel or not? 03
(b) Explain getch(), getchar(), gets(), puts() . 04
(c) Write a program to add all the elements of an array. 07
Q.4 (a) What is structure? Explain with example how to declare a structure and how to 03
initialize it.
(b) Explain following string manipulation function. 04
strcat( ), strcpy( ) ,strcmp( ) and strlen( )
1
(c) Define a Structures which contains details of a Cricketer: 07
• Name of Player:
• Team name:
• Total run scored:
• Batting average:
OR
Q.4 (a) Debug the following codes and show the output for this: 03
For ( i=0 ; i<=50 ; i++ );
{
printf( “\n %d” , i )
}
*consider header files and declaration of variable is done.
(b) Summarize the methods for initialization of One-Dimensional array. 04
(c) Construct a C program to add 3X3 matrix. 07
OR
Q.5 (a) Write True / False against following statements: 03
1) Pointer is a variable which holds address of location where value of other
variable is stored.
2) Pointer holds the address in form of float or integer.
3) The address of a variable can be stored in two or more pointers.
(b) Write a C program to copy content of one file to other with the help of file 04
handling functions.
(c) Develope a program in C to check the entered number is prime or not by creating 07
a user-defined function named check_prime().
*************************
2
Enrolment No./Seat No_______________
Q.3 (a) Differentiate while loop and do..while loop with example. 03
(b) What is type conversion? Explain two types of conversion with examples. 04
(c) Write a C program which takes marks (between 0 to 100) of a student for 07
N subjects. It should print grade of a student based on Percentage of
Student's marks .
"A" for >=85%,
"B" between >=70% and <85%,
"C" between >=50% and <70%,
"PASS" between >=35% and <50%,
"FAIL", if any one subject marks are <35.
1
OR
Q.3 (a) What is function? How Call by value and Call by reference passes the 03
argument in function.
(b) What are the steps in writing a recursive function in a program? 04
(c) Write a program in C to calculate the power of any number using recursion. 07
Q.5 (a) What is a pointer? What are the advantages of using pointer? 03
(b) Explain need of Dynamic Memory allocation. Compare malloc(), calloc() 04
and realloc() functions.
(c) Write a C program to find the sum and mean of all elements in an array 07
using pointer.
OR
Q.5 (a) What is File Pointer? What is significance of File Pointer? 03
(b) Explain signification of following functions in file operations. 04
1. fseek()
2. ftell()
3. open()
4. fread()
(c) Write a C program to read ID and marks of n number of students from user 07
and store them in a file.
****************
2
Enrolment No./Seat No_______________
(c) Define Flow chart, List the rules for designing a Flow chart and Rephrase the 07
merits and demerits of flow chart.
Q.3 (a) Contrast the Entry Control loop and Exit Control loop. 03
(b) Construct a C program to find the largest number amongst three integers 04
entered.
(c) Construct a C program to check if entered integer is a prime number or note. 07
OR
Q.3 (a) Debug the following codes and show the output for this: 03
For ( i=0 ; i<=50 ; i++ );
{
printf( “\n %d” , i )
}
1
Q.4 (a) List the types of Array. 03
(b) Summarize the methods for initialization of One-Dimensional array. 04
(c) Construct a C program to multiply 3X3 matrix. 07
OR
Q.4 (a) List the application of gets getchar and puts functions. 03
(b) Summarize the method for Declaration, initialization and Printing on screen 04
of a String.
(c) Define a Structures which contains details of a Cricketer: 07
• Name of Player:
• Team name:
• Total run scored:
• Batting average:
*************
2
Seat No.: ________ Enrolment No.___________
Marks
Q.1 (a) Write an algorithm to check whether the entered number is Even or Odd. 03
(b) Draw the flowchart to find the factorial of a number given by user. 04
(c) Briefly explain different components of Computer system. 07
1
Q.4 (a) Give the significance of puts(), getchar(), getch(). 03
(b) Differentiate between call by value and call by reference. 04
(c) Write a C program to check whether two strings are same or not. 07
OR
Q.4 (a) Give the output of following C code. 03
int main(){
int val=20, *p;
p = &val;
printf(“%d %d %d”, val, *p, sizeof(p));
return 0;
}
(b) Demonstrate the use of recursion with an example. 04
(c) Write a C program to find sum of digits for a given number using the concept 07
of User Defined Function (UDF). (Hint: For number 3278, sum of digits is
3+2+7+8 = 20)
**********
2
Seat No.: ________ Enrolment No.___________
Q.2 (a) Differentiate: Exit controlled Loop and Entry controlled Loop 03
(b) Explain: 04
a) switch-case statement
b) continue statement
(c) Write a C program to find factorial of a number using recursion. 07
OR
(c) Write a C program to generate first n number of Fibonacci series using 07
recursion.( 0 1 1 2 3 5 8…)
1
OR
Q.4 (a) List any three header file with its usage. 03
(b) Write a program to print following patterns : 04
1
22
333
4444
(c) Define a structure type struct personal that would contain person name, 07
date of joining and salary using this structure to read this information of
5 people and print the same on screen.
Q.5 (a) What is dynamic memory allocation? Show the use of malloc() and 03
calloc() function with their syntax.
(b) What is structure? How it is different from union? Explain nested 04
structure with example.
(c) Write a C program to check whether a number is prime or not. 07
OR
Q.5 (a) Explain following string handling functions: I. strcat() II. strcmp() III. 03
strlen
(b) What is Pointer in C and how it initializes? State its advantages. 04
*******************************
2
Seat No.: ________ Enrolment No.___________
Q.2 (a) Demonstrate the working of bitwise shift and sizeof operator with an 03
example.
(b) Differentiate while and do..while loop. 04
(c) Write a C program to check whether the entered character is alphabet, 07
digit, space or any special character.
OR
(c) Write a C program to print following pattern: 07
1
22
333
4444
Q.3 (a) Find out error(s), if any in the following code and correct it: 03
int main() {
if(10%2==0){
break;
}
}
(b) Examine following code and give output of it. 04
void main(){
int a=0;
while (a<10) {
a++;
if (a%3==1) {
continue;
}
printf (" %d", a);
}}
(c) Write a C program to find factorial of a given number. 07
OR
Q.3 (a) Find out error(s), if any in the following code and correct it: 03
int main() {
printf(“%f %d”, 7.0%5.0, 5 || -2);
}
(b) Examine following code and give output of it. 04
void main(){
int i=1;
1
for (i=10; i>=1 ; --i) {
printf (“ %d”, i);
i--;
}
}
(c) Write a C program to make sum of digits of a given number. (if input is 07
145, output should be 10)
2
Seat No.: ________ Enrolment No.___________
Q.1 Mark
(a) Answer the following questions 03
1. Define: Compiler
2. Justify, 2 and ‘2’ both are not same in C language.
3. What is the role of sizeof operator in C language?
(b) Answer the following questions 04
1. Ternary operator can be nested. (True/False)
2. What do you mean by enumerated data type in C language?
3. What is the difference between char *p and char p[]?
4. What do you mean by function prototype?
(b) Answer the following questions 07
1. Define Algorithm.
2. What do you mean by recursion?
3. What do you mean by program and program control?
4. What is a pointer?
5. What is the role of getc( ) and getw() file functions?
6. Programming needs logic building. Justify
7. Define Interpreter.
(c) Explain the working of various bit-wise operators with the example. 07
OR
(c) List out all various string functions and describe them with syntax and 07
example.
Q.3 (a) Explain ternary (?:) operator in detail with the example. 03
(b) Discuss the need of break and continue statements with example. 04
(c) Design a flowchart for checking whether a given number is palindrome or not. 07
OR
Q.3 (a) What is meant by array of pointers? Explain it with example. 03
(b) Write a program to print the triangle shown below. 04
A
AB
ABC
ABCD
(c) Draw block diagram of computer system and explain the functions of each 07
component in detail.
(c) Explain one dimensional array, two dimensional array and multi-dimensional 07
array with their syntax and example.
OR
Q.5 (a) Differentiate call by value and call by reference. 03
(b) Explain structure within structure with example. 04
OR
Q.5 (a) Define Union in ‘C’ with example. 03
(b) Define dynamic memory allocation. Explain malloc() and calloc(). 04
(c) Explain the following File Handling functions: 1. fseek( ) 2. ftell( ) 3. fread( ) 07
4. fwrite( ) 5. fscanf( ) 6. fprintf( ) 7.rewind( )
***********