C Interviews
C Interview
The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other operating systems, and is one of the most widely used programming languages. C is prized for its efficiency, and is the most popular programming language for writing system software, though it is also used for writing applications.
1. When we write printf("%d",x); this means compiler will print the value of x. But as here, there is nothing after %d so compiler will show in output window garbage value.
C language was developed in between 1969 and 1973 at AT & T Bell Labs by Dennis MacAlistair Ritchie.
Functions are declared in header files. Whereas functions are defined in library subroutine
A static identifier (or static variable) retains its value throughout program execution. The default value of a uninitialized static identifier is zero.
typedef is a keyword used in C and C++. It is used to assign alternative name to a type that already exist. It is used for types that are confusing or are likely to have alternative implementations in a program.
Pointer is a variable that is used to store the memory address of another variable.
Macros is a small fragment of code that is assigned with a name. Wherever that name is used it is replaced by the code in macros.
i. Function-like macros : they are used like a function call. We can also pass parameters in a function-like macros. ii. Object-like macros : they are similar as data objects.
Yes, we can use a C keyword as macros name.