Congratulations - you have completed C Programming : Multiple Choice Questions. You scored %%SCORE%% out of %%TOTAL%%. Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1
Global Variable is a Variable that is _________ available.
A
Globally
B
Locally
Question 2
Scope of Global variable is ___________.
A
None of these
B
Throughout the program
C
In the Outer Block Only
D
Function in which it is declared
Question 3
Guess the output of the program -
#include<stdio.h>
int var=10;
void message();
void main()
{
int var=20;
  {
  int var = 30;
  printf("%d ",var); 
  }
printf("%d ",var);
message();   
}
void message()
{
printf("%d ",var);   
}
A
30 10 20
B
30 20 10
C
10 30 20
D
10 20 30
Question 4
If inside current function block, variable is not defined then compiler look for global copy.
A
True
B
False
Question 5
Using global variable is bad practice of writing code.
A
Yes
B
No
Question 5 Explanation: 
Writing global variable is considered as bad practice because of their non-locality and a global variable can potentially be modified from anywhere in the program.
Question 6
The use of global variables makes software harder to read and understand.
A
True
B
False
Question 7
Global Variables are variables declared outside any of the c function !
A
False
B
Completely True
C
Yes Partially True
D
None of these
Question 7 Explanation: 
Any Variable declared inside function can be considered as global variable from inner block.
Question 8
We can declare any number of global variables in a C Program.
A
False
B
True
Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 8 questions to complete.