| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the use of #pragma pack, wer it is used? | Wipro | 1 |
| pointer_variable=(typecasting
datatype*)malloc(sizeof(datatype));
This is the syntax for malloc?Please explain this,how it
work with an example? | Excel | 2 |
| WAP – represent a char in binary format
| Motorola | 4 |
| Describe advantages and disadvantages of the various stock
sorting algorithms | Microsoft | 1 |
| Write a program to find the smallest and largest element in
a given array in c language | Microsoft | 3 |
| wap in c to accept n number display the highest and lowest
value | | 2 |
| f(x,y,z)
{
y = y+1;
z = z+x;
}
main()
{
int a,b;
a = 2
b = 2;
f(a+b,a,a);
print a;
}
what is the value of 'a' printed | | 4 |
| Write a program for the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms | Convex-Digital | 4 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 2 |
| a C prog to swap 2 no.s without using variables just an
array? | TCS | 4 |
| Write a program that accepts a string where multiple spaces
are given in between the words. Print the string ignoring
the multiple spaces.
Example:
Input: “ We.....Are....Student “ Note: one .=1 Space
Output: "We Are Student" | IBM | 4 |
| 1)which of following operator can't be overloaded.
a)== b)++ c)?! d)<= | Siemens | 10 |
| what is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
} | | 10 |
| What's wrong with "char *p; *p = malloc(10);"? | | 5 |
| Difference between null pointer and dangling pointer? | Wipro | 3 |
| what does " calloc" do? | Cadence | 6 |
| What is #pragma directive?how it is used in the program?
what is its advantages and disadvantages? | | 1 |
| What is meaning of "Void main" in C Language. | TCS | 8 |
| any string of bits of length 'n' represents a unique non-
negative integer between.............? | | 2 |
| why we shiuld use main keyword in C | | 5 |
| |
| For more C Interview Questions Click Here |