Sponsored Links

Interview Questions



INTERVIEW QUESTIONS C++ C++ BASICS DETAILS

Question: What is prototype in c++ and c?

Answer: Prototype is a model that can explain the structure of the functions we are going to use in our C and C++ programs.Suppose we are going to use one function called add with two parameters to add means the prototype of the function is int add(int a,int b), simply prototype in C and C++ is the function declaration.

Category C++ Basics Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.3) By 7571 users
Added on 12/29/2013
Views 70405
Rate it!

Question: What is prototype in c++ and c?

Answer:

Prototype is a model that can explain the structure of the functions we are going to use in our C and C++ programs.Suppose we are going to use one function called add with two parameters to add means the prototype of the function is int add(int a,int b), simply prototype in C and C++ is the function declaration. Source: CoolInterview.com

Answered by: Sasikumaran | Date: 1/22/2009 | Contact Sasikumaran Contact Sasikumaran

In both the languages Prototype refers to the function declaration having no body, which includes body later in the program.<br><br>It helps in structuring program. Source: CoolInterview.com

Answered by: Vivekanand Sharma | Date: 1/30/2009 | Contact Vivekanand Sharma Contact Vivekanand Sharma

prototype of the function tell the compiler that this type of function is defined in the program. Source: CoolInterview.com

Answered by: ajay awasthi | Date: 2/4/2009 | Contact ajay awasthi Contact ajay awasthi

The word prototype comes from the Latin words proto, meaning original, and typus, meaning form or model. In a non-technical context, a prototype is an especially representative example of a given category. <br><br>In prototype-based programming, a prototype is an original object; new objects are created by copying the prototype. <br> Source: CoolInterview.com

Answered by: M.Raghunath23 | Date: 2/19/2009 | Contact M.Raghunath23 Contact M.Raghunath23

Prototype describe the function interface to the compiler by giving details such as the number n type of arguments.Prototype is must in c++.<br><br>In C.<br><br>In main, we declare the (types) of properties,Ex.'int' in a similiar manner to the function definition.This is accomplished by,<br><br>int a,b,c;<br><br>and is called function prototyoe. A function prototype specifies the type of value returned by the function,the name of function and the type(s) of arguments expected by the function. this enables the compiler to check that,when the function is used, the correct number and the types of arguments are supplied. Source: CoolInterview.com

Answered by: Ajeet singh | Date: 4/3/2009 | Contact Ajeet singh Contact Ajeet singh

Prototype is nothing but simply a statement in which we define the return type and which type of argument any function will be take,define.Remember one thing it is always define in starting of our program.<br>It is helpful for compiler,when function actually call in our program. Source: CoolInterview.com

Answered by: sumeet guha | Date: 7/1/2009 | Contact sumeet guha Contact sumeet guha

prototype is nothing but the function declaration.how compiler stores its prototype internally.Lets consider a function Add with two int arguments,the C compiler is going to store this value something like Add, but C++ compiler will stores this value something like Add_2_int_int,thats why c++ compiler allows overloading ,though function name is same as it arguments changes it store as diggerent prototype or function signature. Source: CoolInterview.com

Answered by: Chandramouli Kandagatla | Date: 7/23/2009 | Contact Chandramouli Kandagatla Contact Chandramouli Kandagatla

The prototype describes the function interface to the compiler by giving detalis such as the number and type of arguments and the type of return values. Source: CoolInterview.com

Answered by: Pooja | Date: 10/21/2009 | Contact Pooja Contact Pooja

Can somebody tell the exact usage of function prototype. How exactly Compiler uses it. Most of the answers are about what is a function prototype and does not answer why they are required? Source: CoolInterview.com

Answered by: hello | Date: 2/8/2010 | Contact hello Contact hello

Function declaration is called as the prototype in both c and c++




Regards,
Nicku
Source: CoolInterview.com

Answered by: nicku | Date: 8/9/2010 | Contact nicku Contact nicku

function prototype is nothing but a function declaration. in which what we have to do that in function initially. Source: CoolInterview.com

Answered by: kismu | Date: 8/14/2010 | Contact kismu Contact kismu

the prototype is nothing but a function declaration of what we have to do that function.same function name different data types of argument may pass.then the function is called function overloading. Source: CoolInterview.com

Answered by: kismu | Date: 8/14/2010 | Contact kismu Contact kismu

Prototype is just simply function declaration in C and C++. Source: CoolInterview.com

Answered by: Neha | Date: 9/6/2010 | Contact Neha Contact Neha


If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification Enter the above shown code: *
Inform me about updated answers to this question

Related Questions
View Answer
Can constructors & destructor be virtual ?
View Answer
Define a class named cord, a point in Cartesian coordinate system where each point has two int type values x and y. Your class must contain necessary constructors and arithmetic operator functions. Write necessary codes to test your class?

View Answer
How do you access the static member of a class?
View Answer
What is a local class?
View Answer
What is class?
What is object?
Describe these 2 with example.
View Answer
I am a new computer engineering student can you please explain what is c++ and its uses please answer me this question as faster as you can?
View Answer
What is the definition of abstract class and virtual function?
View Answer
What is the return value for getch()?
View Answer
What are the major differences between
C, C++, JAVA?
View Answer
Which type of questions are asked in interviews?
View Answer
what are the differences between c and c++? If possible give more points.
what are the disadvantages of C++?
View Answer
What is Difference between c and c++?
View Answer
what are the differences between member function and constructor?
View Answer
why c++ is called as object-oriented language? Here what does object mean?
View Answer
what are the differences between c and c++.what are the advantages the are only in c++ but not in c
View Answer
The class which acts as interface between the C++ and the Java layer?

View Answer
What is a class?


View Answer
What is the difference between structures and classes in C++?
View Answer
What is the difference between class and structure?


View Answer
What is the Basic nature of "cin" and "cout" and what concept or principle we are using on those two?

View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All C++ Basics Interview Questions & Answers - Exam Mode / Learning Mode



User Options
India News Network

Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal



Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |




Copyright ©2003-2025 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions