CSE-211 Computer Programming R1 EEE
CSE-211 Computer Programming R1 EEE
Instructions for the students: Answer any four from the following questions. All the questions contain
equal marks. Assume reasonable data if any missing. Necessary charts may be supplied on request.
Only use of calculator is allowed for the purpose of calculation. Use of any electronic devices is strictly
prohibited in the exam hall.
1. a. #include <stdio.h> 2
int main()
{
int a[2][2] = { 10, 20, 30, 40 };
int *p;
p = &a[1][0];
return 0;
}
Find the value of *p, *(p+1),*p-1,*(p-2)
b. Write a program in C to separate odd and even integers into separate arrays and display 4
them.
c. Write a program in C to sort elements of an array in ascending and descending order. 4
4. a. Write a program to enter the marks of 5 students in English, Mathematics and Biology 5
using a structure named Result having elements student_name, ID, eng_marks,
math_marks and bio_marks and then display the average marks of each student.
b. Write a C program to store the employee information (ID, Name, Joining date, Salary) 5
using structure. Declare a nested structure to store the joining date which includes day,
month and year.
Student.txt
Himel 1001
Joy 1002
Shihab 1003
Riya 1004
Samiha 1005
Write a C program to perform write operation on the file Student.txt and store the
file contents mentioned above in it.
b. Write a C program that creates a new file by deleting all the vowels(a,e,i,o u) from 5
an existing file.