function prototype declarations

Posted by sandy101 on Stack Overflow See other posts from Stack Overflow or by sandy101
Published on 2010-04-10T17:40:16Z Indexed on 2010/04/10 18:33 UTC
Read the original article Hit count: 286

Filed under:
|
|

I am practice the function in c and come across to the program ....

#include<stdio.h>

int main()
{
    float a=15.5;
    char ch ='C';
    printit(a,ch);
    return 0;
}

printit(a,ch)
{
    printf("%f\n%c",a,ch);
}

I want to know that why the above program compile and not give the error as i understood so for is ...

  1. The function in c must be declared with the specific prototype (but this program does not contain the prototype)

  2. why the program give the output 'x'for the char variable ?

  3. can the function in c are capable of accepting the value without being declared about type in parameters like what has done in the function declaration ?

© Stack Overflow or respective owner

Related posts about c

    Related posts about function