16
16
Structure
● Create a structure named student with members name, roll, marks of 3 subjects. Calculate
percentage and display all information in proper format. Ask user for the number of
students.
● Create a structure named employee with members name, id, post, age. Count how many
employees are older than age 45 and display the number. Ask user for the number of
employees.
● Create a structure named employee with members name, id, post, age and salary. Calculate
tax and net-salary separately. Ask user for the number of employees.
● Create a structure named student with members name, roll, marks of 3 subjects. Calculate
percentage and display that information whose percentage is greater than 50% in proper
format. Ask user for the number of students.
● Create a structure named ‘std’ with members name,roll,sec and marks of 3 subjects. Count
how many students have passed assuming the pass marks is 40. Ask user for the number of
students.
File in C (Read mode)
● A datafile “student.txt” contain name, class and marks obtained in 3 different subject of few
students. Write a C program to read and display only records who pass in all subjects assuming
pass marks is 35. Also count how many students have passed.
● A datafile “student.txt” contain name, class and marks obtained in 3 different subject of few
students. Write a C program to read and display only records whose name is Ram.
● A datafile “student.txt” contain name, class and marks obtained in 3 different subject of few
students. Write a C program to read and display only name and percentage of all students.
Write mode
● A datafile “student.txt” contain name, class and marks obtained in 3 different subject of few
students. Write a C program to store all information along with percentage assuming total marks
is 80.
● Create a datafile “patient.txt” and store name, disease, age and bed number of a patient. Ask
user if they want to add more data.
● Create a datafile “employee.txt” and store name, designation, age and salary of a patient. Allow
to add more data when user presses ‘y’.
Javascript and Php
● Factorial of a number (both)
● Multiplication table (both)
● Fibonacci Series (both)
● Write a program that reverses a number. (both)
● Display largest among 3 numbers. (both)
● Odd/even (both)
● Database connection using php
● Insert data into stddb database with fields fname, lname, age, address using php.
● Create a table emp in empdb database with fields fname, lname, age, address using php.