actually main function is a user defined function for the C
compiler developer.... but it is a built in or predefined
function according to the users using that compiler.... why
it is called as a predefined function because , the
prototype has already been defined in the compiler itself
we the users can't change the meaning of that unless or
until we write our own compiler , we can change the meaning
for the main() , we don't know what is the prototype or
where the function has been called and wht excatly the
return value of it... it is built in and abstracted from the
user which is called abstraction in c++.........
the definition of main is given by the user so it is called
user define function..
the prototype is define by the compiler so it is called
this function is dependent on both user and compiler for
the execution of the program.so it is not only user define
so we can say it is a special function called by operating
system to execute the program.
Main() is a predefined
returning val -all these
parameters only kown
to compile,not to
user.but we can use it
as user defined by
specifying our own
main() function is niether predefined nor user defined function. Because if it is predefined, when program is written in main() function then given their own logic then how it is predefined. Another one if it is user defined, then we can write the any function name on the place of main(). So main() is niether a predefined nor user defined function.
can you explain in brief what is "r+" mode in a file... i
know that it si used to read and modify rhe existing
content.... but explalanation about the file pointer in "r+"
mode i wann to know???????????
Given a number N, product(N) is the product of the digits of
N. We can then form a sequence N, product(N),
product(product(N))… For example, using 99, we get the
sequence 99, 99 = 81, 81 = 8.
A single integer N
A single integer which is the number of steps after which a
single digit number occurs in the sequence.
Sample Test Cases:
Step - 1 : 9 * 9 = 81
Step - 2 : 8 * 1 = 8
There are 2 steps to get to this single digit number.
=> do u mean above program's output...
=>output will be:2,whatever you enter value for b.
=>because scanf is a library fn which will return how many
arguements it processes, and second value
you are right mr.Satya but i found my self unable to
understand that for the first time scanf returns the no of
successful matches but how for the second time it returns
the value of 'b'.while a function should return the
same 'r' value every time.