Question
main()
{
char string[] = "Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}
a.
will print Hello World
b.
Compilation Error
c.
will print garbage value
d.
None of these
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the result of compiling and running this code?
Similar Questions
Discover Related MCQs
Q. 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.
View solution
Q. Which of the following is a complete function?
View solution
Q. The recursive functions are executed in a ...........
View solution
Q. The function scanf() returns .........
View solution
Q. Functions have ..........
View solution
Q. Which of the following function calculates the square of 'x' in C?
View solution
Q. When a function is recursively called all the automatic variables are stored in a ..........
View solution
Q. Inner Block can access variables declared ___________.
View solution
Q. Can we declare same variable inside the inner and outer block ?
View solution
Q. How would you round off a value from 1.66 to 2.0?
View solution
Q. By default a real number is treated as a
View solution
Q. The keyword used to transfer control from a function back to the calling function is
View solution
Q. 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 */
}
View solution
Q. In the following 'C' code, in which order the functions would be called ?
a = ( f1(23,14 ) * f2 (12/14)) + f3 () ;
View solution
Q. The function that actually created from a call to a template function is called
View solution
Q. A function that is prototype as
int calculate(int num);
may
View solution
Q. A function that uses variable types is called
View solution
Q. A function that is prototyped as double calculate (int, num);
may
View solution
Q. The declaration
void function1(int)
indicates the function1 is a function which
View solution
Q. The function fprintf is used in a program
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!