Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

# Technical Interview Questions and Answers :: C

#### More Topics

Question :: 21
What is the difference between 'for' and 'while' loops?

No Discussion on this question yet!

Tags:TCS

Question :: 22
Which bitwise operator is suitable for checking whether a particular bit is ON or OFF?

Bitwise

Tags:No Tags on this question yet!

Question :: 23
Which bitwise operator is suitable for turning OFF a particular bit in a number?

The bitwise operator xor i.e '^' is used to turn off a particular number

by performing the following operations say we want to turn the ith bit off in a number n

then n = n^(1<<i)

Tags:No Tags on this question yet!

Question :: 24
What is equivalent of multiplying an unsigned int by 2: left shift of number by 1 or right shift of number by 1?

multiplying a number by two is equivalent to bitwise left shift of a number by 1 for eg

1 has a binary representation as 00001 left shift by 1 will make it 00010 which is 2.

right shift is equivalent to divide a number by 2 .

left shift is equivalent to multiply a number by 2.

Tags:No Tags on this question yet!

Question :: 25
What is an Enumeration Constant?

Enumarations are list of integer constants, by default value is zero.

Question :: 26
What is a structure?

No Discussion on this question yet!

Question :: 27
What are the differences between a structure and a union?

Structure- It is an user defined data function that allow to store multiple type of data in a single unit.

It occupies sum of memory of all location.

Whereas, Union- It is also an user defined data function that allow to store multiple type of data in a single unit.

But it occupies memory of largest member only.

Question :: 28
What are the advantages of unions?

No Discussion on this question yet!

Question :: 29
How can typedef be to define a type of structure?

No Discussion on this question yet!

Question :: 30
Write a program that returns 3 numbers from a function using a structure.

#include<stdio.h>

struct name{

int a;

int b;

int c;

};

struct name func(){

struct name s1 ;

s1.a=1;

s1.b=2;

s1.c=3;

return s1;

}

int main(){

struct name val = func();

}