Functions in C (original) (raw)
- A block of code that performs a specific task.
- A preproccessor directive
Which of the following is the correct way to declare a function in C?
In C, what is the meaning of following **function prototype with empty parameter list.
C `
void fun();
`
- Function can only be defined without any parameter.
- Function can be defined with any number of parameters of any types.
- Function can be defined with any number of integer parameters.
- Function can be defined with one integer parameter.
What keyword is used to return a value from a function?
What is the purpose of function prototypes in C?
- To declare functions before use
Which of the following statements about function arguments is FALSE?
- Arguments are passed by value by default in C
- You can pass arrays to functions
- C allows passing functions as arguments
- Arguments can be modified directly in the caller
What happens if a function is called before it is defined and declared?
- The program will run normally
- A runtime error will occur
- A compiler error will occur
- The function will be skipped
Which of the following can be used to achieve "pass by reference" in C?
Which function is always called when a C program starts execution?
Identify the correct statement about the void return type.
- void means the function returns an int
- void means the function can return anything
- void means the function does not return any value
- void is used to skip a function call
There are 22 questions to complete.
Take a part in the ongoing discussion