A2Z UPDATES: Basic C Language Interview Questions Answers PDF Free Download

Thursday, 13 June 2013

Basic C Language Interview Questions Answers PDF Free Download

This post contain C Language interview Questions and Answers in this we provide basic C Language Interview questions,various basic C language interview questions and important interview questions of C language.In this post we covered all searches like c language interview questions,basic c language interview questions and answers and interview question on c language just follow this..


C Language Interview Questions and Answers

 C Language Basic Interview Questions and Answers:

-->
the below given question are basic various C Language Interview Questions , important interview questions of c language and interview questions on c language so every c professional must visit this C language Interview Questions and Answers.

1)who invented  C Language?
Ans:Dennis Richie in 1972 developed a new language by inheriting the features of both BCPL and B and adding additional features. He named the language as just C.This is Basic C Language Interview Question.
2)who invented B Language?
Ans:Ken Thomson at AT&T Bell Labs developed a language and named it B. Even the B language was found to have some short comings to support development of both business applications and system software.
3)who invented BCPL Language?
Ans:Basic Combined Programming Language(BCPL) was developed by Martin Richards, Cambridge university. 
4)why C Language?
Ans:C is one of the high level languages. It is a general purpose language, which means it can be used to write programs of any sort.
5)what is C Language?
Ans: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.
6)what are the Features of C Language?
Ans:1) In C one can write programs like that of high level languages as in COBOL, BASIC, FORTRAN etc. as well as it permits very close interaction with the inner workings of the computer.
2) It is a general purpose programming language. It is usually called system programming language but equally suited to writing a variety of applications.
3) It supports various data types
4) It follows the programming style based on fundamental control flow constructions for structured programming.
5) Functions may be pre–defined or user defined and they may return values of basic types, structures, unions or pointers.
7)What are the Advantages of C Language?
Ans:1)Easy to write
2)Rich set of operators and functions that are built–in
3)Support for bit–wise operation
4)Flexible use of pointers
5)Direct control over the hardware
6)Ability to access BIOS/DOS routines
7)Interacting using Interrupts
8)Ability to write TSR programs
9)Ability to create .COM files
10)Ability to create library files (.LIB)
11)Ability to write interface programs
12)Incorporating assembly language in C program
8)what are the Disadvantages of C Language?
Ans:1)C is considered difficult to learn
2)Because of its conciseness, the code can be difficult to follow
3)It is not suited to applications that require a lot of report formatting and data file manipulation
9)what are the Salient Features of C Language?
Ans:1)C is called a middle level language
2)C supports structured design approach
3)C is extensible
4)C is rich in data types and operators
5)C is portable
10)what does Static Variable mean?
Ans:There are 3 main uses for the static.
1. If you declare within a function:
It retains the value between function calls
2.If it is declared for a function name:
By default function is extern..so it will be visible from other files if the function declaration is as static..it is invisible for the outer files 
3. Static for global variables:
By default we can use the global variables from outside files If it is static global..that variable is limited to with in the file.
11)what are the different Storage Classes in C?
Ans:C has three types of storage: automatic, static and allocated. 
Variable having block scope and without static specifier have automatic storage duration. 
Variables with block scope, and with static specifier have static scope. Global variables (i.e, file scope) with or without the the static specifier also have static scope. 
Memory obtained from calls to malloc(), alloc() or realloc() belongs to allocated storage class.
12)what is Hashing in C Language?
Ans:To hash means to grind up, and that’s essentially what hashing is all about. The heart of a hashing algorithm is a hash function that takes your nice, neat data and grinds it into some random-looking integer. 
The idea behind hashing is that some data either has no inherent ordering (such as images) or is expensive to compare (such as images). If the data has no inherent ordering, you can’t perform comparison searches. 
If the data is expensive to compare, the number of comparisons used even by a binary search might be too many. So instead of looking at the data themselves, you’ll condense (hash) the data to an integer (its hash value) and keep all the data with the same hash value in the same place. This task is carried out by using the hash value as an index into an array. 

To search for an item, you simply hash it and look at all the data whose hash values match that of the data you’re looking for. This technique greatly lessens the number of items you have to look at. If the parameters are set up with care and enough storage is available for the hash table, the number of comparisons needed to find an item can be made arbitrarily close to one. 
One aspect that affects the efficiency of a hashing implementation is the hash function itself. It should ideally distribute data randomly throughout the entire hash table, to reduce the likelihood of collisions. Collisions occur when two different keys have the same hash value. 

There are two ways to resolve this problem. In open addressing, the collision is resolved by the choosing of another position in the hash table for the element inserted later. When the hash table is searched, if the entry is not found at its hashed position in the table, the search continues checking until either the element is found or an empty position in the table is found.

The second method of resolving a hash collision is called chaining. In this method, a bucket or linked list holds all the elements whose keys hash to the same value. When the hash table is searched, the list must be searched linearly.
13)what is a Header File?
Ans:Header files provide the definitions and declarations for the library functions. Thus, each header file contains the library functions along with the necessary definitions and declarations. For example, stdio.h, math.h, stdlib.h, string.h etc.
14)what is Character Set?
Ans:Character set is the set of characters allowed and supported in the programming language. Generally a program is a collection of instructions, which contain groups of characters. Only a limited set of characters is allowed to write instructions in the program. 
15)what is C Token?
Ans:The smallest individual units of a C program are known as tokens. 
16) List the different types of C Tokens?
Ans:
Constants
Identifiers
Keywords
Operators
Special symbols
Strings

17) what is a String?
Ans:A string is a sequence of characters ending with NUL. It can be treated as a one–dimensional array of characters terminated by a NUL character. 
18)can Static Variable be declared in a Header File?
Ans:You can’t declare a static variable without defining it as well (this is because the storage class modifiers static and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header file to have its own private copy of the variable, which is probably not what was intended.
19)what is Null Pointer?
Ans:There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in , has a value that’s guaranteed to be different from any valid pointer. NULL is a literal zero, possibly cast to void* or char*.
Some people, notably C++ programmers, prefer to use 0 rather than NULL.
The null pointer is used in three ways:
1) To stop indirection in a recursive data structure.
2) As an error value.
3) As a sentinel value.

20) what is Qualifier?
Ans:Qualifiers or modifiers are identifiers that may precede the scalar data types (except float) to specify the number of bits used for representing the respective type of data in memory. The qualifiers in C are short, long, signed, and unsigned. 

 for more C Language Interview Questions      click here
  for more Interview Questions On C Language click here

Interview Questions and Answers on C Language:

This video contain Interview Questions and Answers on C Language here simply understand C language interview Questions so just visit this Interview Questions and Answers on C Language video....

           

                                                                   more questions coming soon.........
        

No comments :

Post a Comment