1. Expalin gcc options
& optimization technique?
2.
Explain preprocessor directives?how to
define & undefine the value at run time?
3.
Explain inline & macro differences?
4. How
the make file work exe : gcc -o main main.c
5.
Diff between static and dynamic linking
6.
Macro and inline function and when it will resolve and who will resolve?+
condition ( is evry time inline will be inline
7. Explain compilation
process in detail
8. Explain the concept
of linking n loading?
9.
Explain C memory layout with a diagram?
What is the benefit of using an enum rather than a #defined constant ? Explain
with an example .
11. What is preprocessor ? What will the preprocessor do
for the program?
12.
# pragma directive
13. Explain Stringizing
operator with respect to preprocessor?
14.
Preprocessor Error Directive (#error)
15.
How variable argument lists works in c? Explain with an example.
16.
If home directory contains libstr.a libstr.so then while including which one is
included in your program(static or dynamic library)?i.e.. cc main.c -L
/home/ -lstr
17. What is the output of the following
program?
#include<stdio.h>
#define
x(x) #x
int
main()
{
char a[10]=x(TEL);
printf("\n%s\n",a);
}
18. Is NULL always defined as 0?
19. How do you override a defined macro?
20. What is #line used for?
21. What is a pragma?
22. What are the standard predefined macros?
23. How can type-insensitive macros be created?
24. How many levels deep can include files be nested?
25. Can include files be nested?
26. Can you define which header file to include at compile
time?
27. What is the difference between #include and #include
“file”?
28. Is it better to use a macro or a function?
29. How are portions of a program disabled in demo
versions?
30. What is the benefit of using an enum rather than a
#define constant?
31. What is the benefit of using #define to declare a
constant?
32. Can a file other than a .h file be included with
#include?
33. How can you avoid including a header more than once?
34. What will the preprocessor do for a program?
35. #define x 10
;
int main()
{
printf("%d\n",
x);
}
36. #define big (x,y) x>y?x:y
int main()
{
printf("%d",
big(10,20));
}
37. #define Max(a,b) a>b?a:b
int main()
{
printf("%d\n", Max(900,100)+10);
}
#include <stdio.h>
No comments:
Post a Comment