Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Programming Interviews:C FunctionsC PointersC Preprocessor
Copyright © 2018. All Rights Reserved
C Pointers Interview Question:
What is the C Language function prototype?
Submitted by: AdministratorThe basic definition of a function is known as function prototype. The signature of the function is same that of a normal function, except instead of containing code, it always ends with semicolon.
When the compiler makes a single pass over each and every file that is compiled. If a function call is encountered by the compiler, which is not yet been defined, the compiler throws an error.
One of the solution for the above is to restructure the program, in which all the functions appear only before they are called in another function.
Another solution is writing the function prototypes at the beginning of the file, which ensures the C compiler to read and process the function definitions, before there is a change of calling the function. If prototypes are declared, it is convenient and comfortable for the developer to write the code of those functions which are just the needed ones.
Submitted by: Administrator
When the compiler makes a single pass over each and every file that is compiled. If a function call is encountered by the compiler, which is not yet been defined, the compiler throws an error.
One of the solution for the above is to restructure the program, in which all the functions appear only before they are called in another function.
Another solution is writing the function prototypes at the beginning of the file, which ensures the C compiler to read and process the function definitions, before there is a change of calling the function. If prototypes are declared, it is convenient and comfortable for the developer to write the code of those functions which are just the needed ones.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.