| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 6 |
| 4.weight conversion:
Write a program that will read weight in pounds and convert
it into grams.print both the original weight and the
converted value.There are 454 grams in a pound.design and
carry out a test plan for this program.
| Wipro | 1 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| write a program to swap bits in a character and return the value
prototype of function
char fun (char a, charb flag c)
where fun returns a char, char a is a the value char b is
the bit to be changed and flag c is the bit value
for eg: x=fun(45,7,0)
since 45 is 0010 0101
and ow x should contain the value 65 (0110 0101) | Bosch | 1 |
| what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES??? | NSN | 1 |
| what is the difference between const volatile int i
& volatile const int j; | HCL | 2 |
| The C language terminator is
a.semicolon
b.colon
c.period
d.exclamation mark
| TCS | 3 |
| How can I allocate arrays or structures bigger than 64K? | | 4 |
| what is real time system?what is the differance between hard
and soft real time systems | | 2 |
| write a program structure to find average of given number | | 1 |
| 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 |
| int main()
{
int *p=new int;
*p=10;
del p;
cout<<*p;
*p= 60;
cout<<*p;
}
what will be the output & why? | TCS | 4 |
| long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
| HCL | 11 |
| #include<stdio.h>
int fun();
int i;
int main()
{
while(i)
{
fun();
main();
}
printf("hello \n");
return 0;
}
int fun()
{
printf("hi");
}
answer is hello.how??wat is tat while(i) mean? | Intel | 4 |
| main()
{
clrscr();
}
clrscr();
| ME | 3 |
| What is the diffences between Windows XP and Windows Visa
| Aricent | 1 |
| What is meaning of "Void main" in C Language. | TCS | 8 |
| #define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs? | Ramco | 4 |
| How would you find a cycle in a linked list?
| | 2 |
| write a string copy function routine? | | 1 |
| |
| For more C Interview Questions Click Here |