| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What does extern mean in a function declaration? | | 2 |
| WAP to accept basic salary of an employee?
Calculate it HRA=25%,DA=30%,PF=30%&net salary display all
contents? | | 5 |
| what does the following code do?
fn(int n,int p,int r)
{
static int a=p;
switch(n){
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
a.computes simple interest for one year
b.computes amount on compound interest for 1 to 4 years
c.computes simple interest for four year
d.computes compound interst for 1 year
| TCS | 4 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| what are the various memory handling mechanisms in C ? | HP | 3 |
| write a own function for strstr | LG-Soft | 1 |
| 6)swap(int x,y)
{
int temp;
temp=x;
x=y;
y=temp;
}
main()
{
int x=2;y=3;
swap(x,y);
}
after calling swap ,what are yhe values x&y?
| | 2 |
| what is the diference between pointer to the function and
function to the pointer? | | 2 |
| write a function which accept two numbers from main() and
interchange them using pointers? | | 3 |
| Every time i run a c-code in editor,
getting some runtime error and editor is disposing,
even after reinstalling the software
what may be the problem? | | 2 |
| write a function for strtok()?? | Verifone | 1 |
| array contains zeros and ones as elements.we need to bring
zeros one side and one other side in single parse.
ex:a[]={0,0,1,0,1,1,0,0}
o/p={0,0,0,0,0,1,1,1} | Motorola | 7 |
| what is the output of the following program?
main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 7 |
| What is the difference between static and global variables? | | 1 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| how to find out the union of two character arrays? | | 1 |
| which of the following statements is incorrect
a.typedef struct new{
int n1;
char n2;
} DATA;
b.typedef struct {
int n3;
char *n4;
}ICE;
c.typedef union {
int n5;
float n6;
} UDT;
d.#typedef union {
int n7;
float n8;
} TUDAT;
| TCS | 5 |
| write a c programs to do multiplication of two numbers with
out using arithmatic operator ?????????? | TCS | 4 |
| Difference between null pointer and dangling pointer? | Wipro | 3 |
| 1
232
34543
4567654
can anyone tell me how to slove this c question | | 3 |
| |
| For more C Interview Questions Click Here |