The C programming language is a standardized programming language Visit soundofheaven.info for more Interview Questions with Answers. Page 2. Look for Basic C jobs interview questions and answers page and understand the interview model to prepare in a strategic way so as to get best results in return. C is the general and basic programming language that will create a base for other programming languages. Read Top C programming interview questions and answers. Download C programming interview questions PDF.
|Language:||English, Spanish, Hindi|
|Genre:||Business & Career|
|ePub File Size:||28.68 MB|
|PDF File Size:||14.88 MB|
|Distribution:||Free* [*Regsitration Required]|
Top C Programming Interview Questions & Answers. last updated March .. The basic data types are int, char, and float. . Download PDF. C programming language was developed at Bell Laboratories in by Dennis Ritchie. C is structure/procedure oriented programming language whereas C++ is object oriented programming language. Polymorphism, virtual function, inheritance, Operator overloading, namespace concepts are. Frequently asked C interview questions with answers and detailed explanations for technical interviews in pdf. Download PDF to practice.
Dot Net Framework Interview Questions. It is a complex process for modifying the node in a linked list. Null pointer is a pointer which cannot point to anywhere in the program, but uninitialised pointer can point to anywhere in the users program. It is referred to as a terminating null character, and is used primarily to show the end of a string value. It is the gradual loss of available computer memory when a program repeatedly fails to return memory that it has obtained for temporary use. When using getch , the key that was pressed will not appear on the screen, and is automatically captured and assigned to a variable.
The value of such a variable will remain and may be seen even after calls to a function. One more thing is that a declaration statement of such a variable inside a function will be executed only once.
The following are the differences between structures and arrays: Question 7. Define Macros. A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before entering into the actual coding main function.
A macro is defined with the preprocessor directive, define. The advantage of using macro is the execution speed of the program fragment. When the actual code snippet is to be used, it can be substituted by the name of the macro. The same block of statements, on the other hand, need to be repeatedly hard coded as and when required. The disadvantage of the macro is the size of the program. The reason is, the pre-processor will replace all the macros in the program by its real definition prior to the compilation process of the program.
Question 8. This value is passed as a constant or a variable with value. The function can update the value available in the memory location by referencing the pointer. Question 9.
Define Static Identifier In C? This value can be used between function calls. The default value of an uninitialized static variable is zero.
A function can also be defined as a static function, which has the same scope of the static variable. Question What Are The Auto Variables? Where Are They Stored?
The auto variables are stored in the main memory of the system. The keyword 'auto' is optional. Many of the variables used by the program or application are 'auto' variables, being the main memory is faster. These variables are stored in the memory runtime stack. It is de-allocated at the completion of its block execution. It is a local variable which is allocated and deallocated automatically when the program flow enters and leaves the variable's scope.
The difference between arrays and linked lists are: A set of named integer constants is known as an enumeration. The enumeration type declaration includes the name of the enumeration tag and the definition of a set of named integers. Variables of enumeration type persists one of the existing values of the enumeration set. The enum type variables could be utilized in indexing expressions, as operands of all arithmetic and relational operators. ANSI C enum expressions are always have int type, which occupies the memory space that occupied by the int type.
The identifier sunday is explicitly assigned with 0. The remaining identifiers are given values 1 through 5 by default. The scope of a variable is specified by its storage allocation. This is specified by the keywords — auto, extern, static and register. The keyword typedef is used for defining user defined data types.
A new definition of existing data types is created by using typedef. It is used to define user defined identifiers which can be used in substitution of type specifiers such as int, float etc. It does not reserve memory space. The names defined by typedef are synonyms for the data types. If Possible How? The fgets function is safer to use. It checks the bounds, i. The gets function does not check the bounds.
The gets function is an insecure and careless use can lead to errors. The function strcpy will not allocate the memory space to copy. A pointer to the string to copy and a pointer to place to copy it to should be given.
This memory space needs to be freed up later when it is of no use anymore. For char array, such size is not accepted by the compiler. Define Void Pointer? A void pointer is pointer which has no specified data type.
It is also known as a generic pointer. The void pointer can be pointed to any type. If needed, the type can be cast. A void pointer is generally used as function parameters, when the parameter or return type is unknown.
What Is A Const Pointer? A const pointer is not the pointer to constant, it is the constant. In the above example it is not, Hence it is not the pointer to constant.
The ptr can not be used to point to another integer. The integer pointed by ptr can be changed. The const pointer can not be changed to point to other memory location, because the pointer is constant. Explain Memory Leak? An unwanted increase in programs is referred to as a memory leak is C language.
The intake of the program increases in the memory by an unintentional consumption of the memory. If the program is getting corrupted and results in errors, it means the memory leak.
In case there is a leak by any program, the function of the system may stop and violate operating system files. Explain bit masking in C? Differentiate call by value and call by reference? What is register variable in C language? Enter a string: Apple is Red The reverse of the string is: What does printf does?
When can you use a pointer with a function? A pointer can be used with a function- When an address is to be passed to a function When an array elements are to be accessed through a function. Passing base address will give access to the whole array. What is recursion in C? Advantages of using recursion: Is there any demerits of using pointer? List some basic data types in C? In Programming Languages data types are used to define a variable before its use.
Below are list of some basic data types in C language. Plays a role of generic data type. What is a void pointer? What do you understand by normalization of pointers? Explain continue keyword in C. List some applications of C programming language?
Application of C Programming Language To develop embedded software It is to create a computer application It is effective to create a compiler for various computer languages to convert them into low-level language that is the machine understandable language. It is used for creating software for various applications and even hardware. What is the difference between constant pointer and constant variable?
It was created by Bjarne Stroustrup. Declaration of global multiple values are accepted. What are the uses of a pointer? What is a structure? What is a union? What are the differences between structures and union? What are the differences between structures and arrays? In header files whether functions are declared or defined? What are the differences between malloc and calloc? What are macros? What are its advantages and disadvantages?
Difference between pass by reference and pass by What is static identifier? Where is the auto variables stored? Where does global, static, and local, register Difference between arrays and linked list?
What are enumerations? Describe about storage allocation and scope of What are register variables?