Bsc CSIT Semester 1 – C Programming – Unit 8: Structure and Union (5 Hrs.)
Comprehensive questions and detailed answers for Unit 8: Structure and Union (5 Hrs.). Perfect for exam preparation and concept clarity.
Create a structure called STUDENT with data members SID, name, address, CGPA. Write a program to initialize the value of 100 students and display the information of those students whose address is “KTM” and CGPA is between 3.5 to 4. using C program
Define structure and nested structure. Write a program to find out whether the nth term of the Fibonacci series is a prime number or not. Read the value of n from the user and display the result in the main function. Uses separate user-defined function to generate the nth Fibonacci term and to check whether that number is prime or not.
Differentiate between source code and object code. Create a structure named Book with members Book_Name, Price and Author_Name, then take input for 10 records of Book and print the name of authors having the price of book greater than 1000.
What is the difference between exit(0) and exit(1)? Discuss the need of nested structue with an example. Write a program to find the value of xy without using POW code.
Create a structure “Employee” having Name, Address, Salary, and Age as member functions. Display the name of the employee having aged between 40 and 50 are living in Kathmandu.
What is the advantage of the union over structure? List any four-string library functions with the prototype.
Define structure. Explain nested structure with example. Create a structure named book with name, author, and publisher as its members. Write a program using this structure to read data of 50 books and display name of those books published by “XYX” publisher.
What is structure? How is it different from union? Create a structure named course with name, code, and credit_hour as its members. Write a program using this structure to read data of 5courses and display data of those curses with credit_hour greater than 3.
What is structure? Create a structure rectangle with data members length and breadth.
What is structure? How is it different from array? Create a structure student having data members name, roll-number and percentage. Complete the program to display the name of student having percentage greater than or equal to 60.
Sample Questions
Define structure and nested structure. Write a program to find out whether the nth term of the Fibonacci series is a prime number or not. Read the value of n from the user and display the result in th
Differentiate between source code and object code. Create a structure named Book with members BookName, Price and AuthorName, then take input for 10 records of Book and print the name of authors havin
What is the difference between exit(0) and exit(1)? Discuss the need of nested structue with an example. Write a program to find the value of xy without using POW code.
Create a structure “Employee” having Name, Address, Salary, and Age as member functions. Display the name of the employee having aged between 40 and 50 are living in Kathmandu.
And more questions available on this page.