Output Questions Set 5
Quiz-summary
0 of 10 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Information
Output Questions
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 10 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Answered
- Review
-
Question 1 of 10
1. Question
1 pointsIs it possible to run program without main() function?
Correct
Hint:
Ideally No but remember pragma directives allows few function to be executed before and after main() functionIncorrect
Hint:
Ideally No but remember pragma directives allows few function to be executed before and after main() function -
Question 2 of 10
2. Question
1 pointsHow many main() function we can have in our project?
Correct
Hint:
We can’t have more than one main() function in a project.Incorrect
Hint:
We can’t have more than one main() function in a project. -
Question 3 of 10
3. Question
1 pointsWhat is sizeof() in C?
Correct
Hint:
Anything which has opening and closing braces () is not functionIncorrect
Hint:
Anything which has opening and closing braces () is not function -
Question 4 of 10
4. Question
1 pointsIs it true that a function may have several declaration, but only one definition.
Correct
Hint:
Declaration like int sum(int, int); is allowed number of times but definition int sum(int a, int b) { return a+b; } is allowed only one time. Multiple definition of same function is compilation error ( redefinition error )Incorrect
Hint:
Declaration like int sum(int, int); is allowed number of times but definition int sum(int a, int b) { return a+b; } is allowed only one time. Multiple definition of same function is compilation error ( redefinition error ) -
Question 5 of 10
5. Question
1 pointsint main()
{
extern int i;
i = 20;
printf(“%d”, sizeof(i));
return 0;
}Correct
Hint:
extern int i; tell the compiler that int i is declared in some other file, in this code we have not included any other header file so it will cause compilation error.Incorrect
Hint:
extern int i; tell the compiler that int i is declared in some other file, in this code we have not included any other header file so it will cause compilation error. -
Question 6 of 10
6. Question
1 pointsIs the following statement a declaration or definition
extern int i;Correct
Incorrect
-
Question 7 of 10
7. Question
1 pointsint main()
{
int x = 10;
{
int x = 0;
printf(“%d”,x);
}
return 0;
}Correct
Hint:
It will print nearest values that is x =0Incorrect
Hint:
It will print nearest values that is x =0 -
Question 8 of 10
8. Question
1 pointsint main()
{
int x = 0;
printf(“%d”,x);
return 0;
}Correct
Hint:
It will print nearest values that is x =0. To print x=10; scope resolution operator :: should be used like printf(“%d”, ::a)Incorrect
Hint:
It will print nearest values that is x =0. To print x=10; scope resolution operator :: should be used like printf(“%d”, ::a) -
Question 9 of 10
9. Question
1 points//This program is compiled on 32 bit DEV-C++
int main()
{char *ptr1, *ptr2;
printf(“%d %d”, sizeof(ptr1), sizeof(ptr2));return 0;
}Correct
Hint:
On 32 compilers pointer’s size is 4 bytes while on 64 bit compiler pointers size is 8 bytes. Note – If your computer is 64 bits then you can use both 32 bits and 64 bits compiler on it.Incorrect
Hint:
On 32 compilers pointer’s size is 4 bytes while on 64 bit compiler pointers size is 8 bytes. Note – If your computer is 64 bits then you can use both 32 bits and 64 bits compiler on it. -
Question 10 of 10
10. Question
1 pointsWhich programming language is more faster among these?
Correct
Hint:
Execution flow ( faster to slower) Binary -> Assembly -> C -> C++ > Java / PHP / VBIncorrect
Hint:
Execution flow ( faster to slower) Binary -> Assembly -> C -> C++ > Java / PHP / VB