Hello guys! Welcome to my blog. In this article I'm going to discuss some of the most important interview question which have been asked during interview for freshers. So, let’s look at the list of questions.
What is dangling pointer?
The pointer which holds the address initially, but later releases the held address, such pointer can be called as dangling pointer.
What is the purpose of the keyword typedef?
typedef can be used to alias the existing type and also it can be used to simplify the complex declaration of the data type.
What is invalue and rvalue?
The expression\data which appears on right side of the assignment operator that can be called as rvalue. Rvalue can be assigned to lnvalue, which will appear on left side of the assignment operator.
What is a nested structure?
A structure which contains an element of another structure as its member is referred to as nested structure.
What is modular approach\programming.?
If we divide the main program into sub programs to achieve the given task is module approach.
What are enumerations?
The list of integers with name are called as enumerators. These are defined with the keyword enum.
Explain about “stdin”.
It’s a pointer variable. It opens for standard input device by defaultly.
What is the purpose of #undef pre-processor?
It can be used to undefine the existing macro definition.
What is difference between far and near pointers?
The pointers which can access 2^15 memory space, that is near pointer. The pointer which can access 2^32 memory space, that is far pointer.
What is default function call method?
The functions are called by value by defaultly.
What is the output file generated by linker?
Usually, linker generates an executable file.
When the macros gets expanded?
While processing.
Is there a way to compare two structure variables?
No. We have to compare element by element in a structure variable.
What are valid operations on pointers?
Addition\subtraction
Is 068 a valid octal number?
No, it contains invalid octal digits.
What is full form of ANSI?
ANSI stands for- American National Standards Institute.
What is difference between “g” and ‘g’?
“g” is considered as string, because it is enclosed within double quotes. ‘g’ is considered as character because it is enclosed within single quotes.
What is the range of int datatype.?
The range of int datatype is, -32,768 to 32,767.
How can we store a negative integer?
If we want to store to store a negative integer, we have to go through the following steps. We have to calculate the two’s complement of the same positive integer.
E.g: (-6)
Step-1 − One’s complement of 6: 1001
Step-2 − Add 1 to above, giving, 1010 which is –6
Explain the difference between Actual Parameters and Formal Parameters.
The Parameters that are sent from main function to the subdivided function are referred to as Actual Parameters. The parameters which are declared by the Subdivided function end are referred to as Formal Parameters.
Why is C called the mother of all Languages?
C has introduced many core concepts and data structures such as, lists, strings, arrays, functions, etc. Many other languages designed after C are designed on the basis of C Language. This is why C is considered as the mother of all languages.
Which is efficient among these? and why? x=x+1; or x++?
x++; is the more efficient statement because it just a single instruction to the compiler.
What is the function of a '\0' character in C?
‘\0’ is referred to as a terminating null character in C. It indicates the end of the string value.
How to generate random numbers in C programming?
By using the rand () command we can generate random numbers in C.
What is wrong with this statement?
myName = "Robin";
You cannot use the assignment operator = to assign values to a string variable. Instead of that, we have to use the strcpy function. The correct statement will be-- strcpy(myName, "Robin");
How to print a string containing '%' in printf?
There is no any escape sequence provided for '%' in C. To print '%' you should use '%%', like -
printf(“she got 90%% marks in math”);
Still many questions are there. But I have taken unique one.
Please do subscribe the channels-
Thank you!