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: Model, syllabus wise question

Arrays and Strings
1.
Define array. Differentiate between 1D and 2D array. Write a program that stores 100 integers in an array and display them in ascending order. [4+6]
2.
How is string defined in C program? Write a program to check if a given string is a palindrome or not. [5]
Control Structures
1.
Define iterative statements. Write a program that using a loop to compute and prints the sum of squares of first 10 even natural numbers. [5]
2.
Differentiate between switch case and else .. if ladder. Why is break statement used inside switch case? Explain briefly. [5]
Elements of C
1.
Define the basic structure of C program. Explain the Compilation and Execution of a C program? [5]
File Handling
1.
Explain the syntax of fwrite() function. Write a program to create a file named "student.txt" and stores record of any five students given by user. [5]
Functions
1.
Discuss the advantages of using functions in programming. Differentiate between recursive function and normal function. Write a program using call by reference to swap the values of two variables. [6+4]
Input/output Functions
1.
Write short notes on: i) Formatted input/output Write short notes on: ii) C Preprocessors/directives [2.5+2.5]
Operators and Expressions
1.
What are the uses of comments and escape sequences in a C program, explain with example? [5]
2.
What are relational operators and arithmetic operators? Write a C code to check if a given number is odd or even. [5]
Pointers
1.
Describe the concept of pointer and its arithmetic with suitable examples. [5]
Structure and Unions
1.
Define structure. Write syntax for defining and initializing structure? Write a program that stores details of N employees (E_id, E_Name, Salary), and display the details of those employees whose salary is less than 10000. [5+5]