Preprocessors
- Comment on the output of the following C code.
#include <stdio.h>
#define num 200);
int main()
{
printf("%d\n", num
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
200
- Which of the following Macro substitution are accepted in C?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
None of these
- What will be the output of the following C code?
#include <stdio.h>
#define calcA 5 + 3
#define calcB 4 + 6
int main()
{
int Res = calcA * calcB;
printf("%d\n", Res);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
23
- What will be the output of the following C code?
#include <stdio.h>
# define count
void fun()
{
printf("Welcome");
}
void main()
{
count;
fun();
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Welcome
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
#define count 55
count = 23;
printf("%d", count);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Compilation Error
main.c: In function ‘main’:
main.c:5:15: error: lvalue required as left operand of assignment
count = 23;