Determine output:
main()
{
int i = abc(10);
printf("%d", --i);
}
int abc(int i)
{
return(i++);
}
Determine output:
main()
{
int i = abc(10);
printf("%d", --i);
}
int abc(int i)
{
return(i++);
}
Functions have ..........
Functions have ..........
char* myfunc(char *ptr)
{
ptr+=3;
return(ptr);
}
void main()
{
char *x, *y;
x = "EXAMVEDA";
y = myfunc(x);
printf("y=%s", y);
}
What will be printed when the sample code above is executed?
char* myfunc(char *ptr)
{
ptr+=3;
return(ptr);
}
void main()
{
char *x, *y;
x = "EXAMVEDA";
y = myfunc(x);
printf("y=%s", y);
}
What will be printed when the sample code above is executed?
What will be printed when this program is executed?
int f(int x)
{
if(x <= 4)
return x;
return f(--x);
}
void main()
{
printf("%d ", f(7));
}
What will be printed when this program is executed?
int f(int x)
{
if(x <= 4)
return x;
return f(--x);
}
void main()
{
printf("%d ", f(7));
}
Which of the following function calculates the square of 'x' in C?
Which of the following function calculates the square of 'x' in C?
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.
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.
Which of the following is a complete function?
Which of the following is a complete function?
When a function is recursively called all the automatic variables are stored in a ..........
When a function is recursively called all the automatic variables are stored in a ..........
The function scanf() returns .........
The function scanf() returns .........
The default parameter passing mechanism is
The default parameter passing mechanism is
Use of functions
Use of functions
What is the result of compiling and running this code?
main()
{
char string[] = "Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}
What is the result of compiling and running this code?
main()
{
char string[] = "Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}
Any C program
Any C program
What will happen after compiling and running following code?
main()
{
printf("%p", main);
}
What will happen after compiling and running following code?
main()
{
printf("%p", main);
}
What is function?
What is function?
Determine output:
main()
{
int i = 5;
printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}
Determine output:
main()
{
int i = 5;
printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}
What will be the output of the following program code?
main()
{
static int var = 5;
printf("%d ", var--);
if(var)
main();
}
What will be the output of the following program code?
main()
{
static int var = 5;
printf("%d ", var--);
if(var)
main();
}
The recursive functions are executed in a ...........
The recursive functions are executed in a ...........