| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a program structure to find average of given number | | 1 |
| CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position. | Adobe | 4 |
| please give me answer with details
#include<stdio.h>
main()
{
int i=1;
i=(++i)*(++i)*(++i);
printf("%d",i);
getch();
} | | 3 |
| Is the C language is the portable language...If yes...Then
Why...and if not then what is problem so it is not a
Portable language..??? | TCS | 1 |
| write a c program to find biggest of 3 number without
relational operator? | Wipro | 2 |
| what type of language is C? | Microsoft | 2 |
| the number 138 is called well ordered number because the
three digits in the number (1,3,8) increase from left to right
(1<3<8). the number 365 is not well ordered coz 6 is larger
than 5.
write a program that wull find and display all possible
three digit well ordered numbers.
sample:
123,124,125,126,127,128,129,134
,135,136,137,138,139,145,146,147
148
149,156.......789 | | 3 |
| program to find which character is occured more times in a
string and how many times it has occured? for example in
the sentence "i love india" the output should be i & 3. | | 3 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| what is the use of using linked list and array? | Infosys | 9 |
| write a 'c' program to sum the number of integer values | | 5 |
| how to find string length wihtout using c function? | | 4 |
| What's the difference between calloc() and malloc()? | | 3 |
| what is available in C language but not in C++? | | 1 |
| #include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
| Oracle | 13 |
| What is the difference between static and global variables? | | 1 |
| for example user gives input as " 20 or 20.0 or rs 20.0 or
20.00 or rs20 and so .. on " and the output should be
stored as " rs.20.00 " in a variable | | 2 |
|
#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 |
| program to find a smallest number in an array | Microsoft | 5 |
| A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 2 |
| |
| For more C Interview Questions Click Here |