Publish Events & Email Alerts

Subscribe our email alerts and Publish your events with us

You'll Receive & Get Benefits :

Publish & Subscribe

 Technicalsymposium

C Materials Free Download

What is lvalue and rvalue? 

The expression appearing on right side of the assignment operator is called as rvalue. Rvalue is assigned to lvalue, which appears on left side of the assignment operator. The lvalue should designate to a variable not a constant. 

What is the difference between actual and formal parameters? 

The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters. 

Can a program be compiled without main() function? 

Yes, it can be but cannot be executed, as the execution requires main() function definition.

What is the advantage of declaring void pointers? 

When we do not know what type of the memory address the pointer variable is going to hold, then we declare a void pointer for such. 

Where an automatic variable is stored? 

Every local variable by default being an auto variable is stored in stack memory.

What is a nested structure? 

A structure containing an element of another structure as its member is referred so.

What is the difference between variable declaration and variable definition? 

Declaration associates type to the variable whereas definition gives the value to the variable.

What is a self-referential structure? 

A structure containing the same structure pointer variable as its element is called as self-referential structure.

Does a built-in header file contains built-in function definition? 

No, the header file only declares function. The definition is in library which is linked by the linker.

Explain modular programming. 

Dividing the program in to sub programs (modules/function) to achieve the given task is modular approach. More generic functions definition gives the ability to re-use the functions, such as built-in library functions. 

What is a token? 

A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol.

What is a preprocessor? 

Preprocessor is a directive to the compiler to perform certain things before the actual compilation process begins.

Explain the use of %i format specifier w.r.t scanf(). 

Can be used to input integer in all the supported format.

How can you print a \ (backslash) using any of the printf() family of functions. 

Escape it using \ (backslash).

Does a break is required by default case in switch statement? 

Yes, if it is not appearing as the last case and if we do not want the control to flow to the following case after default if any.

When to user -> (arrow) operator. 

If the structure/union variable is a pointer variable, to access structure/union elements the arrow operator is used.

What are bit fields? 

We can create integer structure members of differing size apart from non-standard size using bit fields. Such structure size is automatically adjusted with the multiple of integer size of the machine. 

What are command line arguments? 

The arguments which we pass to the main() function while executing the program are called as command line arguments. The parameters are always strings held in the second argument (below in args) of the function which is array of character pointers. First argument represents the count of arguments (below in count) and updated automatically by operating system. 

main( int count, char *args[]) {

}

What are the different ways of passing parameters to the functions? Which to use when? 

• Call by value - We send only values to the function as parameters. We choose this if we do not want the actual parameters to be modified with formal parameters but just used. 

• Call by reference - We send address of the actual parameters instead of values. We choose this if we do want the actual parameters to be modified with formal parameters. 

What is the purpose of built-in stricmp() function. 

It compares two strings by ignoring the case.

Describe the file opening mode “w+”. 

Opens a file both for reading and writing. If a file is not existing it creates one, else if the file is existing it will be over written.

Where the address of operator (&) cannot be used? 

It cannot be used on constants.

It cannot be used on variable which are declared using register storage class.

Is FILE a built-in data type? 

No, it is a structure defined in stdio.h.

What is reminder for 5.0 % 2? 

Error, It is invalid that either of the operands for the modulus operator (%) is a real number.

How many operators are there under the category of ternary operators? 

There is only one operator and is conditional operator (? : ).

Which key word is used to perform unconditional branching? 

goto

What is a pointer to a function? Give the general syntax for the same. 

A pointer holding the reference of the function is called pointer to a function. In general it is declared as follows.

T (*fun_ptr) (T1,T2…); Where T is any date type.

Once fun_ptr refers a function the same can be invoked using the pointer as follows.

fun_ptr();

[Or]

(*fun_ptr)();

Explain the use of comma operator (,). 

Comma operator can be used to separate two or more expressions.

Eg: printf(“hi”) , printf(“Hello”);

What is a NULL statement? 

A null statement is no executable statements such as ; (semicolon).

Eg: int count = 0; 

while( ++count<=10 ) ;

Above does nothing 10 times.

What is a static function? 

A function’s definition prefixed with static keyword is called as a static function. You would make a function static if it should be called only within the same source code. 

Which compiler switch to be used for compiling the programs using math library with gcc compiler? 

Opiton –lm to be used as > gcc –lm 

Which operator is used to continue the definition of macro in the next line? 

Backward slash (\) is used.

E.g. #define MESSAGE "Hi, \

Welcome to C"

Which operator is used to receive the variable number of arguments for a function? 

Ellipses (…) is used for the same. A general function definition looks as follows

void f(int k,…) {

} What is the problem with the following coding snippet? 

char *s1 = "hello",*s2 = "welcome";

strcat(s1,s2);

s1 points to a string constant and cannot be altered.

Which built-in library function can be used to re-size the allocated dynamic memory? 

realloc().

Define an array. 

Array is collection of similar data items under a common name.

What are enumerations? 

Enumerations are list of integer constants with name. Enumerators are defined with the keyword enum.

Which built-in function can be used to move the file pointer internally? 

fseek()

What is a variable? 

A variable is the name storage.

Who designed C programming language? 

Dennis M Ritchie.

C is successor of which programming language? 

B

What is the full form of ANSI? 

American National Standards Institute.

Which operator can be used to determine the size of a data type or variable? 

sizeof

Can we assign a float variable to a long integer variable? 

Yes, with loss of fractional part.

Is 068 a valid octal number? 

No, it contains invalid octal digits.

What it the return value of a relational operator if it returns any? 

Return a value 1 if the relation between the expressions is true, else 0.

How does bitwise operator XOR works. 

If both the corresponding bits are same it gives 0 else 1.

What is an infinite loop? 

A loop executing repeatedly as the loop-expression always evaluates to true such as

while(0 == 0) {

}

Explain about ‘stdin’. 

stdin in a pointer variable which is by default opened for standard input device.

Name a function which can be used to close the file stream. 

fclose().

What is the purpose of #undef preprocessor? 

It be used to undefine an existing macro definition.

Define a structure. 

A structure can be defined of collection of heterogeneous data items.

Name the predefined macro which be used to determine whether your compiler is ANSI standard or not? What is typecasting? 

Typecasting is a way to convert a variable/constant from one type to another type.

What is recursion? 

Function calling itself is called as recursion.

Which function can be used to release the dynamic allocated memory? 

free().

What is the first string in the argument vector w.r.t command line arguments? 

Program name.

How can we determine whether a file is successfully opened or not using fopen() function? 

On failure fopen() returns NULL, otherwise opened successfully.

What is the output file generated by the linker. 

Linker generates the executable file.

What is the maximum length of an identifier? 

Ideally it is 32 characters and also implementation dependent.

What is the default function call method? 

By default the functions are called by value.

Functions must and should be declared. Comment on this. 

Function declaration is optional if the same is invoked after its definition.

When the macros gets expanded? 

At the time of preprocessing.

Can a function return multiple values to the caller using return reserved word? 

No, only one value can be returned to the caller.

What is a constant pointer? 

A pointer which is not allowed to be altered to hold another address after it is holding one.

To make pointer generic for which date type it need to be declared? 

Void

Can the structure variable be initialized as soon as it is declared? 

Yes, w.r.t the order of structure elements only.

Is there a way to compare two structure variables? 

There is no such. We need to compare element by element of the structure variables.

Which built-in library function can be used to match a patter from the string? 

Strstr()

What is difference between far and near pointers? 

In first place they are non-standard keywords. A near pointer can access only 2^15 memory space and far pointer can access 2^32 memory space. Both the keywords are implementation specific and are non-standard. 

Can we nest comments in a C code? 

No, we cannot.

Which control loop is recommended if you have to execute set of statements for fixed number of times? 

for – Loop.

What is a constant? 

A value which cannot be modified is called so. Such variables are qualified with the keyword const.

Can we use just the tag name of structures to declare the variables for the same? 

No, we need to use both the keyword ‘struct’ and the tag name.

Can the main() function left empty? 

Yes, possibly the program doing nothing.

Can one function call another? 

Yes, any user defined function can call any function.

Apart from Dennis Ritchie who the other person who contributed in design of C language. 

Brain Kernighan

Source: Contents are provided by Technicalsymposium Google Group Members. 
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members. 
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.


Government Jobs

All State and Central Government Jobs/Railway & Bank Jobs/Alll Competitive Exams-Complete Details.

Software Jobs

Entry Level Software & IT Jobs in Chennai/Bangalore & Leading Metro Cities-Complete Details.

Conference/Symposium

Engineering Colleges & University /Premier Institute (IIT/IIM/etc.,) Events Details.

Off-Campus/Walk-in

All Software Companies & Core Companies Off-Campus Interviews & Walk-in across India-Complete Details.

All Bank Jobs

All Government Bank & Private Bank Jobs-Complete Details.

Internships

All Companies Internships-Complete Details.

IBPS

Probationary Officers/Clerk and Management Trainees & All IBPS Exams/Syllabus-Complete Details.

GATE

All Branches Syllabus & Question Papers-Free Download.

IES-Exam

Indian Engineering Services Syllabus & Question.Papers-Complete Details.

Software Program

Top Programming Source Codes/Lab Manuals with Solutions-Complete Details

Anna University

B.E/B.Tech/M.E/M.Tech/MCA/MBA Latest Syllabus & Question Papers

Scholarships

All Central & State Govt Scholarships/ International Scholarships/Merit Scholarships Details.

Placement Papers

All Companies Placement Papers with Answers - Free Download of Materials

Aptitude

All Aptitude Test Topics with Answers-Complete Details & Free Download

Technical Round Interview

All Companies Technical Round Interview Asked Questions with Answers

Certifications

All Certifications Software & All Branches Certifications-Complete Details.

Group Discussion

Group Discussion Various Topics with Valid Points-Complete Details.

HR Round

All HR Round Questions and Answers/Tips & Do's and Don'ts of HR Round.

General Job

Job Interview Tips & Do's/Dont's/Dress Codes/Body Language-Complete Details.

Placement ebooks

All Companies Placement Materials with Answers-Complete Details.

Technical Round Tips

All Kind of Technical Round Interview Tips and Answers/ Do's and Don'ts

Resume

Resume Writing Tips/Do's & Don'ts-Complete Details.

Career Pages

All MNC Companies Career Pages & Current Openings-Complete Details.

Software Projects

All Software Projects with Source Codes-Free Download & Details.

GRE

GRE Exam Procedure and Complete Details.

TOEFL

TOEFL Exam Procedure and Complete Details.

IELTS

IELTS Exam Procedure and Complete Details

SAT

SAT Exam Procedure and Complete Details

GMAT

GMAT Exam Procedure and Complete Details

MS in USA

MS in USA Procedure and Complete Details

Civil Engineering

Civil Engineering Lecture Notes for All Universities & Lab Manuals for All Semester.-Free Download

Mechanical Engineering

Mechanical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Automobile Engineering

Automobile Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Computer Science

Computer Science Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Information Technology

Information Technology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MBA

MBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biotechnology

Biotechnology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biomedical

Biomedical Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Aeronautical Engineering

Aeronautical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download

Chemical Engineering

Chemical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electronics & Communication

Electronics & Communication Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electrical & Electronics

Electrical & Electronics Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MCA

MCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

B.Sc

B.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

BCA

BCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

BBA

BBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

M.Sc

M.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

M.Com

M.Com Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Engineering Maths

All Semester Engineering Maths (M1/M2/M3/M4/etc.,) Lecture Notes-Free Download

Engineering EBooks

All Engineering Branches of ebooks Free Download-Complete Details.

Engineering Physics

All Semester Engineering Physics Lecture Notes-Free Download

GATE Preparation Books

All Branches of GATE Free Preparation eBooks-Free Download.

Engineering Chemistry

All Semester Engineering Chemistry Lecture Notes-Free Download

Software Companies Info

All Software Companies in India - Complete Details.

Admission

Foreign Universities All Course Admission Procedures-Complete Details.

Software Ebooks

All Programming Software free Eboooks-Free Download.

Web Hosting

All Web Hosting Procedure-Complete Details.