Posts

Showing posts from April, 2023

Assignment 3(Structure)

  What is structure? What is Union? Demonstrate puts () function. Demonstrate typedef keyword with example. Explain pointer to structure with example. Explain array of structure with example. Demonstrate “structure within structure” with example. Write a ‘C’ program to accept a time from user as hh:mm:ss & check the validity of it. If it is invalid, validate it. Use pointer to structure. Write a program in ‘C’ to accept details ‘n’ employees & print the details of highest salaried employee. Use structure to store the employee data. Differentiate structure and union.   Write short note to accessing structure members. Write advantage of union. Program to create structure book details & display the book details in proper format by passing structure as function arguments. Write a C program to declare book structure (bookno, bookname, author). Accept details of n books and display books of particular author.

Assignment 2_ String & Preprocessors in C

                                                             Assignments 2                                        String & Preprocessors in C 1) Which function is used to join two strings? Give syntax. 2) What is macro? Explain the types of macros? 3) Give syntax and use of following functions:   i) strlen                 ii) strcat               iii) st...