Skip to main content

Posts

Showing posts with the label c interview questions and answers for freshers

Top 100 C Programming Interview Questions With Answers

1. Explain Various Classes Of Datatypes Of C? Answer:  Following are the major classes of data types in C language: Primary Data Types: Also, known as fundamental/basic data types. All C compilers support four basic data types namely: integer(int), character(char), floating(float), and double precision floating point (double). Then there are extended data types such as long int, double int. Derived Data Types: Also, known as secondary or user-defined data types. These data types, derived from basic data types, include arrays, pointer, structure, union, enum etc. 2. What Are Escape Sequences Characters? List Any Six Of Them. Answer:  The characters which when used with output functions like printf( ), putc(), put() etc. helps in formatting the output are known as Escape sequence character. The following is a list of six escape sequences. \n Newline \t Horizontal Tab \v Vertical Tab \b Backspace \r Carriage Return \\ Backslash 3. What Do You Mean By Underflow ...

C Programming Interview Questions With Answers - Part XV.

129. What Is A Structure? Answer: A structure is a collection of data in which all the declared members are public by default. Data security is limited in structure. The general format of declaration of a structure is: struct { Member1; Member2; ………………. ………………. Member m; } var; 130. What Are The Differences Between A Structure & A Union? Answer: A structure is a collection of data in which all the declared members are public by default. Data security is limited in structure. Union is almost the same as the structure as structure contains members of different data types. In structure, each member has its own memory location whereas members of unions have same memory locations. We can assign values to only one member at a time in union. 131. How Can Typedef Be Used to Define A Type Of Structure? Answer: typedef is used for defining new data types of structures. The general syntax is: typedef type data_name; Here, type is the data type and data_name is ...