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 4 of 6.
Bhanu said:
1 decade ago
Ex: KR notation:
---------------------
void display(__);
main()
{
display();
}
void display()
{
}
ASCII notation:
-------------------
void display(__)
{
}
main()
{
display();
Pre-ANCI Notation:
------------------
1)Main(net, err)
int *net;
double *err;
{
}
---------------------
void display(__);
main()
{
display();
}
void display()
{
}
ASCII notation:
-------------------
void display(__)
{
}
main()
{
display();
Pre-ANCI Notation:
------------------
1)Main(net, err)
int *net;
double *err;
{
}
Sathish said:
1 decade ago
When a memory is allocated in functions during the function call or function definition?
Madhuri said:
1 decade ago
I didn't find any difference between KR and ANSI.
Snehal said:
1 decade ago
Explain pre-ANSI notation?
Ramesh.m said:
1 decade ago
What is kernighan and ritchie notation?
Sree said:
1 decade ago
I think Memory is allocated only during function definition.
Sujith shetty said:
1 decade ago
How structures are initialize? Explain.
Gayathri said:
1 decade ago
Can you please write an example for all the notation which is present in the option?
Uma said:
1 decade ago
What is notation?
Rahul said:
1 decade ago
main()
{
char *p="hai friends",
*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
}
What will be the o/p explain with steps please?
{
char *p="hai friends",
*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
}
What will be the o/p explain with steps please?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers