| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what will happen if you free a pointer twice after
allocating memory dynamically ? | Novell | 2 |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 6 |
| Explain the differences between public, protected, private
and internal. | | 1 |
| a number is perfect if it is equal to the sum of its proper
divisor..
6 is perfect number coz its proper divisors are 1,2 and
three.. and 1+2+3=6...
a number is deficient if the sum of its proper divisor is
less than the number..
sample: 8 is deficient, coz its proper divisors are 1,2 and
4, and 1+2+4=7.
abundant number, if the sum of its proper divisor is greater
than the number..
sample..12 is abundant coz 1+2+3+4+6=16 which is geater than 12.
now write a program that prompts the user for a number, then
determines whether the number is perfect,deficient and
abundant.. | | 1 |
| helllo sir ,
what is the main use of the pointer ,array ,and the
structure with the example of a programe | | 2 |
| what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
} | | 2 |
| main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output? | Ramco | 6 |
| What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"? | | 1 |
| WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES | | 1 |
| I have an array of 100 elements, each of which is a random
integer. I want to know which of the elements:
a) are multiples of 2
b) are multiples of 2 AND 5
c) have a remainder of 3 when divided by 7 | | 1 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 4 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| a 'c' program to tell that the set of three coordinates lie
on a same line | Persistent | 1 |
| palindrome for strings and numbers----Can anybody do the
prog? | TCS | 6 |
| what is the other ways to find a logic to print whether a
number is an even or odd wit out using % symbol??????? i
know three different ways to print it. so i need any other
different logic>>>>> | TCS | 3 |
| what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES??? | NSN | 1 |
| WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200? | | 2 |
| void main()
{
char far *farther,*farthest;
printf("%d..%d",sizeof(farther),sizeof(farthest));
}
| ME | 3 |
| write an interactive program to generate the divisors of a
given integer. | TCS | 4 |
| |
| For more C Interview Questions Click Here |