C Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 2)
2.
What is the notation for following functions?
1.  int f(int a, float b)
    {
        /* Some code */
    }

2.  int f(a, b)
    int a; float b;
    {
        /* Some code */
    }
1. KR Notation
2. ANSI Notation
1. Pre ANSI C Notation
2. KR Notation
1. ANSI Notation
2. KR Notation
1. ANSI Notation
2. Pre ANSI Notation
Answer: Option
Explanation:
KR Notation means Kernighan and Ritche Notation.
Discussion:
59 comments Page 4 of 6.

Mahender said:   1 decade ago
In KR notation first we need to give prototype declaration then function call then comes function definition where as in ASCII notation 1st we need to define the the function defination and then function call.

Ex: KR notation:
---------------------
void display(__);
main()
{
display();
}
void display()
{
}

ASCII notation:
-------------------
void display(__)
{
}
main()
{
display();
}

Tim said:   1 decade ago
Both C and D are correct, technically, since ANSI C did not exist prior to the Kernighan & Ritchie language definition.

Ramya said:   1 decade ago
What is kernighan and ritche notation?

Jamuna said:   1 decade ago
Can anyone explain these 2 notations?

Smile vairam said:   1 decade ago
What is KR notation. ? Can you anyone explain it. ?

Sai said:   1 decade ago
Please. Tell us abt KR notation.

N.Muthu Kumar said:   1 decade ago
There are many standard notations there like Ansi, Pre-Ansi, KR notations. These are nothing but, the specification or representations of methods in a standard format developed at MIT's. That's it. C compiler supports both of these.

Inam said:   1 decade ago
Please some one explain it properly.

Arun said:   1 decade ago
Any one can explin it in proper manner?

Sandy said:   1 decade ago
Can you explain in detail. ?


Post your comments here:

Your comments will be displayed after verification.