function prototype/declaration – Computer Sir Ki Class


Lost your password?

Don't have an account ?
Register (It's FREE) ×


Exam Questions-ICSE2016-02D #JAVA#4227    siteicon   siteicon  

Problem Statement - function prototype/declaration

Write a function prototype of the following:
A function PosChar which takes a string argument and a character argument and returns an integer value.


TC++ #4227

The prototype or function declaration for given question can be written as follows

int PosChar(String s,char c)

<.. body instructions>



  • If we go by technical precision, Java actually does not required a concept of prototype to validate data types of a functions as is required in C++. One can read this question answer trail in quora.
  • It will be more appropriate if questions in board examinations are more precisely framed and they are not on the basis on some old text books which are not updated and provide weak foundation of concepts.


sunmitra| Created: 31-Mar-2018 | Updated: 16-Apr-2019|ICSE2016