Answer Posted / ashu_deepu
because there are codes which we use in the main program
need to be defined before their use.
or we can say we do so to have the prototype declaration
before their use.
eg.printf,scanf etc.
preprocessor include the header file
like stdio,conio etc.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a far pointer in c?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
What is the use of a ‘ ’ character?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
Do you know the purpose of 'register' keyword?
What is the use of #define preprocessor in c?
How can I invoke another program or command and trap its output?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is the difference between char array and char pointer?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Is struct oop?
Can a variable be both const and volatile?
A set of N billiard balls are set on a one-dimensional table. The table is 1 meter long, set north-south with two pockets at either side. Each ball has zero width and there is no friction so it is moving with a fixed velocity of either northward or southward and bounces back in a perfect elastic collision from other balls it encounter on its way (or drop into one of the pockets). Your job is to keep track of the balls movements. Task Please write a program that gets the initial place, speed and direction of all the balls and gives the position of a specific ball after t seconds. Input The first line contains the number of scenarios. Each one of the other lines in the input contains a scenario: The first number, N, is the number of balls; followed by N pairs of numbers: the distance in centimeters from the south end of the table and the speed (positive speed meaning it moves northward); the last two numbers are the number i of the target ball you should track and the time T in seconds. Output The output is a single number for each line which is the place (distance in centimeters from the south end of the table) of the tracked ball after T seconds. Note: There is no new line character at the end of the result. Sample Input 5 1 50 1 1 1000 1 50 1 1 6 1 60 -2 1 6 2 10 1 95 -1 2 30 2 10 1 95 -1 2 60 Sample Output 100 56 48 65 70
What is function prototype in c with example?
What is the need of structure in c?