C Programming :: Functions
-
What will happen after compiling and running following code?
main()
{
printf("%p", main);
}
- Use of functions
- Any C program
- What is function?
-
Determine output:
main()
{
int i = abc(10);
printf("%d", --i);
}
int abc(int i)
{
return(i++);
}
- The default parameter passing mechanism is
-
What is the result of compiling and running this code?
main()
{
char string[] = "Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}
-
Determine output:
main()
{
int i = 5;
printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}
-
Pick the correct statements.
I. The body of a function should have only one return statement.
II. The body of a function may have many return statements.
III. A function can return only one value to the calling environment.
IV. If return statement is omitted, then the function does its job but returns no value to the calling environment. -
What will be the output of the following program code?
main()
{
static int var = 5;
printf("%d ", var--);
if(var)
main();
}