| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory? | | 4 |
| What is alloca() and why is its use discouraged? | | 1 |
| Write a routine that prints out a 2-D array in spiral order! | Lucent | 1 |
| How to add two numbers with using function?
| | 2 |
| Reverse the part of the number which is present from
position i to j. Print the new number.
eg:
num=789876
i=2
j=5
778986 | | 1 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| enum day = { jan = 1 ,feb=4, april, may}
what is the value of may?
a)4 b)5 c)6 d)11
e)none of the above
| HCL | 2 |
| how to print "hai" in c? | | 10 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| what is difference between array and structure?
| TCS | 17 |
| what is the stackpointer | | 2 |
| can we access one file to one directory? | | 1 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 6 |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
|
#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
output? | Ramco | 5 |
| What is C language Terminator? | TCS | 12 |
| main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs? | CitiGroup | 7 |
| 1,4,8,13,21,30,36,45,54,63,73,?,?. | Franklin-Templeton | 5 |
| a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
| Geometric-Software | 6 |
| how we can make 3d venturing graphics on outer interface | Microsoft | 1 |
| |
| For more C Interview Questions Click Here |