Variables
- Which of the following is an external variable in the following C code?
#include <stdio.h>
int function(int p)
{
int q;
return q;
}
int main()
{
int r;
function(r);
}
int s;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
s
- Global variables are ____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
External
- Functions in C are always _________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
External
- What will be the output of the following C code?
#include <stdio.h>
int n = 15;
void main()
{
int n = 5;
printf("%d ", n);
{
int n = 10;
}
printf("%d", n);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
5 5
- What will be the output of the following C code?
#include <stdio.h>
int num = 10;
void main()
{
int num = 5;
printf("%d ", num);
{
num = 6;
}
printf("%d", num);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
5 6