Interview questions for c language

Q1: What are the features of the C language?

Ans: The main features of the C language are given below:

Q2: What is an auto keyword in C?

Ans: In C, the automatic (auto) variable of every local function is known. Local variables are known as declared variables within the function block. Also known as auto variables, the local variables are known. An automatic keyword may be used before a variable data type. If the local variable does not store a value, the value is junk.

Q3: What are variables, and in what way is it different from constants?

Ans: At first, variables and constants may appear identical in that both are identifiers consisting of one or more characters (letters, numbers, and a few allowable symbols). They both have a certain worth, too. Throughout most actions and calculations, the values stored by a variable can be changed in the program. Only at the beginning of a program are constants supplied values at one time. In the software, this variable is not changed. A constant called PI can, for example, be allocated, and a value of 3.1415 can be given. Instead of 3.1415, you may write it as a PI in your program every time you need it.

Q4: What do you mean by Dangling Pointer Variable in C Programming?

Ans: In c programming, a pointer is used to indicate where a current variable is stored. If this variable is removed and the pointer still points to the same memory address, this variable is called a "dangling pointer variable."

Q5: When is the “void” keyword used in a function?

Ans: If you declare functions, you determine if the function returns a value. If the function does not return a value, for example, when some results are shown on the screen, "void" is inserted at the left end of the function header. If a return value is expected after function execution, the return value data type is set instead of "void."