C Language Interview Questions and Answers for Freshers - 8
Question: 36
Where should typecast functions not used in C?
Type cast function should not be used in const and volatile declaration.
Because, constant value can’t be modified by the program once they are defined.
And, volatile variables values might keep on changing without any explicit assignment by the program as operating system will be modifying these values.
Question: 37
Where is the function declared as static stored in memory?
Yes static keyword would not affect where the function gets stored, even if it is static a function will always be stored in stack. But it hides the function from being used in other files other than in which it is declared.
Question: 38
What is gets() function?
The gets() function allows a full line data entry from the user.
When the user processes the enter key to end the input, the entire line of characters is stored to a string variable.
Note that the enter key is not included in the variable, but instead a null terminator is placed after the last character.
Question: 39
What are static functions?
In C, functions are global by default.
The static keyword before a function name makes it static.
Unlike global functions in C, access to static functions is restricted to the file where they are declared.
Therefore, when we want to restrict access to functions, we make them static.
Another reason for making functions static can be reuse of the same function name in other files.
Question: 40
What is the difference between functions abs() and fabs()?
These two functions basically perform the same action, which is to get the absolute value of the given value.
Abs() is used for integer values, while fabs() is used for floating type numbers. Also the prototype for abs() is under <stdlib.h>, while fabs() is under <math.h>.
- Top 500+ C Language Interview Questions and Answers Pdf
- C Language Interview Questions and Answers
- C Language Interview Questions and Answers for Freshers
- C Language Interview Questions and Answers for Experienced
- C Programming Interview Questions and Answers
- Embedded C Interview Questions and Answers Pdf
- Top 200+ Advanced C Language Interview Questions 2020-2021
- C Programming Question Bank with Answers Pdf
- C Programming Interview Questions and Answers for Freshers
- C Programming Interview Questions and Answers for Experienced
- C Programming Basics Questions and Answers Pdf
- 1000+ Advanced C Programming Interview Questions & Answers
- 1000+ C Interview Questions and Answers 2023 - 2024 Pdf
- 1000+ C Programming Coding Questions and Answers
- 1000+ C Basic Interview Questions for Freshers Pdf
- 1000+ C Questions and Answers Pdf
Science Solutions Class 10 Important Questions and Answers More
Science Solutions Class 10 Important Questions and Answers More
Samacheer Kalvi 10th Science Solutions Questions & Answers More
Samacheer Kalvi 10th Science Carbon and Its Compounds Questions More
Carbon and its Compounds Class 10 Questions and Answers More
1000+ Tricky Maths Questions and Answers More
C#- VB.NET Winforms Interview Questions and Answers More
7000+ TNPSC Group 4 General English Online Mock Test 2024 - 2025 More
1,000+ Latest Puzzles for Bank Exams More
TNPSC Chemistry MCQ Questions and Answers More