C Programming
Full Marks: 60
Pass Marks: 24
Time: 3 hours
What is logical error? Write flowchart and program for checking whether the number entered by the user is exactly divisible by 5 or by 11. [1+5]
OR
What is algorithm? Write an algorithm to check given number is prime or composite. [1+5]
What is operator? List any six operators used in C-programming language. Write a program to find least number between any two numbers using ternary operator. [1+2+3]
Define printf() function, header file and main function. Find the value of following expression. Use the value initially assigned to the variables for each expressions. [4.5+1.5]
Difference between if and switch statement. Write a program to read the marks of four subjects then find total, percentage and division according to given condition. [1+5]
Percentage | Division |
---|---|
p ≥ 80 | Distinction |
80 > p ≥ 70 | First division |
70 > p ≥ 50 | Second division |
50 > p ≥ 40 | Third division |
Otherwise | Fail |
Assume each subjects carrying 100 full marks and students must secure greater or equal to 40 in each subjects for division.
Differentiate between break and continue statement. Write a program to display following output [2+4]
Write a program to input any 10 numbers then find out greatest and smallest number. [6]
Write a program to add two 3×3 matrix using function. [6]
What is recursion? Write a program to find the factorial of given number using recursion. [2+4]
OR
What is pointer? Write a program to sort ‘n’ numbers in ascending order using dynamic memory. [2+4]
List any five names of graphics function. Write a program to read line of text then count no. of vowels, No. of digits and no. of spaces. [2+4]
Write a program to create a file “RECORD.TXT” then store roll no, name and percentage of 10 students. [6]