C99 standard guarantees uniqueness of __________ characters for internal names.
- 31
- 63
- 12
- 14
C99 standard guarantees uniqueness of ___________ characters for external names.
- 31
- 6
- 12
- 14
Which of the following is not a valid variable name declaration?
- int __a3;
- int __3a;
- int __A3;
- None of the mentioned
Which of the following is not a valid variable name declaration?
- int _a3;
- int a_3;
- int 3_a;
- int _3a
Why do variable names beginning with the underscore is not encouraged?
- It is not standardized
- To avoid conflicts since assemblers and loaders use such names
- To avoid conflicts since library routines use such names
- To avoid conflicts with environment variables of an operating system
All keywords in C are in ____________
- LowerCase letters
- UpperCase letters
- CamelCase letters
- None of the mentioned
Variable name resolution (number of significant characters for the uniqueness of variable) depends on ___________
- Compiler and linker implementations
- Assemblers and loaders implementations
- C language
- None of the mentioned
Which of the following is not a valid C variable name?
- int number;
- float rate;
- int variable_count;
- int $main;
Which of the following is true for variable names in C?
- They can contain alphanumeric characters as well as special characters
- It is not an error to declare a variable to be one of the keywords(like goto, static)
- Variable names cannot start with a digit
- Variable can be of any length
Which is valid C expression?
- int my_num = 100,000;
- int my_num = 100000;
- int my num = 1000;
- int $my_num = 10000;
What will be the output of the following C code?
#include
int main()
{
printf("Hello World! %d \n", x);
return 0;
}
- Hello World! x;
- Hello World! followed by a junk value
- Compile time error
- Hello World!
What will be the output of the following C code?
#include
int main()
{
int y = 10000;
int y = 34;
printf("Hello World! %d\n", y);
return 0;
}
- Compile time error
- Hello World! 34
- Hello World! 1000
- Hello World! followed by a junk value
Which of the following is not a valid variable name declaration?
- float PI = 3.14;
- double PI = 3.14;
- int PI = 3.14;
- #define PI 3.14
What will happen if the following C code is executed?
#include
int main()
{
int main = 3;
printf("%d", main);
return 0;
}
- It will cause a compile-time error
- It will cause a run-time error
- It will run without any error and prints 3
- It will experience infinite looping
What is the problem in the following variable declaration?
float 3Bedroom-Hall-Kitchen?;
- The variable name begins with an integer
- The special character ‘-‘
- The special character ‘?’
- All of the mentioned
What will be the output of the following C code?
#include
int main()
{
int ThisIsVariableName = 12;
int ThisIsVariablename = 14;
printf("%d", ThisIsVariablename);
return 0;
}
- The program will print 12
- The program will print 14
- The program will have a runtime error
- The program will cause a compile-time error due to redeclaration
Which of the following cannot be a variable name in C?
- volatile
- true
- friend
- export
Which statement can print \n on the screen?
- printf("\\n");
- printf("n\");
- printf("n");
- printf('\n');
How many keywords are there in c ?
- 32
- 31
- 63
- 64
Which variable has the longest scope in the following C code?
#include
int b;
int main()
{
int c;
return 0;
}
int a;
- a
- b
- c
- Both a and b