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 */
}
Answer: Option
Explanation:
KR Notation means Kernighan and Ritche Notation.
Discussion:
59 comments Page 5 of 6.
Sudheer said:
1 decade ago
Who is KR?
Pravin said:
1 decade ago
What is the use of these notations?
Ram said:
1 decade ago
@Mahender: good explanation. Thank you.
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();
}
Ex: KR notation:
---------------------
void display(__);
main()
{
display();
}
void display()
{
}
ASCII notation:
-------------------
void display(__)
{
}
main()
{
display();
}
Raja said:
1 decade ago
Thanks muthukumar.
Kavita said:
1 decade ago
Plz explain what exactly is these notations are with examples?
Riya said:
1 decade ago
Can anyone give me the example of Pre ANSI C notation?
Manish singh said:
1 decade ago
thanks..N.Muthu Kumar...to explane about these notations
Tanmay said:
1 decade ago
What is KR notation?
Sandy said:
1 decade ago
Can you explain in detail. ?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers