Bachelors Level/First Year/First Semester/Science bit/first semester/c programming/syllabus wise questions

Bachelors In Information Technology

Institute of Science and Technology, TU

C Programming (BIT102)

Year Asked: 2080, syllabus wise question

Arrays and Strings
1.
What is an array? How an array can be passed as function argument? Write a program to arrange an array having 10 integer numbers in ascending order using function. [10]
Control Structures
1.
Explain different control structures in C. Write a program in C to perform different arithmetic operations on two integers and display the result based on choice made by user using switch statement. [10]
2.
Explain nested if else ladder with suitable example. [5]
3.
Explain structure of for loop. Write a program to reverse a number entered by user. [5]
File Handling
1.
Why data file is needed? Write a program to write N numbers in file 'number.txt' and then read it and display only even numbers. [5]
Functions
1.
What is recursion? Write a program to find the factorial of a given integer using recursion. [5]
Input/output Functions
1.
What are conversion specifiers? Explain the basic structure of a C program. [5]
Operators and Expressions
1.
List out different operators in C. Explain Logical and relational operator. [5]
Pointers
1.
What is DMA? Write a program to read N numbers and find largest and smallest number using DMA. [5]
2.
What is pointer? Explain the similarity between array and pointer in brief. [5]
Structure and Unions
1.
Differentiate between structure and union? Write a program to read employ id, name, post and salary of employee and display detail of those employee whose post is 'clerk'. [10]
The C Preprocessor
1.
Write short notes on: a) Macro Write short notes on: b) Opening and closing file [2.5+2.5]