C Programming -3rd Semester Question Papers(Diploma in IT Engineering/Computer Engineering)
Set 1
Program: Diploma in It Engineering / Computer Engineering Full Marks:80
Year/ Part :II/I(2016) Pass Marks:32
Subject: C Programming Time:3hrs.
1.a.) What are the different types of errors that can occur in the C programming language? Explain the types of programming language.
b.) Define keyword .Describe the compiling process C code into an executable program.Write the rules to define identifier.
2.a.) Explain the ternary ahd logical operator with examples.How can formatted input/output functions be used in C?
b.) Define loop and switch statement.Write a C program to find the sum of 1+2+3+.....+100.
3.a.) Write a code in C to print the following pattern.
1 1 2 3 4 5
1 0 1 2 3 4
1 0 1 0 1 2 3
1 0 1 0 1 1 2
1 0 1 0 1 0 1
b.) Define array. Write a program to input mxn order matrix and find the sum of all even and odd numbers.
4.a.) Explain call by value and call by reference with suitable examples.
b.) What is structure? Write a C program to take input from user having student_ID,Sutdent_Name,Student_Address and display those Student_Name whose address is "Kathmandu" using structure.
5.a.) What is Pointer? Write a C program to swap two integers using pointer. Explain any 3 String handling function.
b.) What are the different modes of opening files? Explain.Write a program in C to read the content of file name "CTEVT.txt".
6.) Write shorts notes on:(Any Two)
a. Break and Continue
b. Recursive Function
c. Dynamic memory allocation
Good Luck !
Set- 2
Program: Diploma in Computer Engineering Full Marks:80
Year/Part: I/I (2018 New Course) Pass Marks:32
Subject: Computer Programming in C Time:3hrs.
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Attempt Any Five questions.
1.a.) What is programming language? Explain assembler,compiler and interpreter in brief.[2+6]
b.) Define the terms Variable, Constant, keyword and pre- processor directive.[8]
2. a) What is data type? Explain any four basic data types along with its memory size and range.[2+6]
b.) What do you mean by operator? Explain various types of operators used in C on the basic of operation.[2+6]
3. a.) Write a program to find roots of quadratic equation.
ax2 + bx + c =0 , R1.r2 = (-b± b2 - 4ac)/2a
b.) Differentiate between while and do-while loop. Write a program to find sum of digits of given number.[3+5]
4.a.) What is array? Explain any four string handling functions in brief.[2+6]
b.) Write a program in C to arrange any ten numbers in ascending order. [8]
5.a.) Explain call by value and call by reference with suitable examples.[8]
b.) Define the terms function and recursion. Write a program in C to find the factorial of an entered number Using recursion[2+6]
6 a.) Differentiate between structure and Union with example.[8]
b.) Write short notes on: (Any Two) [2x4=8]
i) File opening modes
ii) Formatted Input / Output function
iii) Pointer
Good Luck!
0 Comments