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 2 of 6.
Tanmay said:
1 decade ago
What is KR notation?
Manish singh said:
1 decade ago
thanks..N.Muthu Kumar...to explane about these notations
Riya said:
1 decade ago
Can anyone give me the example of Pre ANSI C notation?
Kavita said:
1 decade ago
Plz explain what exactly is these notations are with examples?
Raja said:
1 decade ago
Thanks muthukumar.
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();
}
Ram said:
1 decade ago
@Mahender: good explanation. Thank you.
Pravin said:
1 decade ago
What is the use of these notations?
Sudheer said:
1 decade ago
Who is KR?
SWETHA said:
1 decade ago
Please explain it clearly!
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers