| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| sir,
i cannot find the way how to write aprogram by using
array on queue | IISIT | 1 |
| pointer_variable=(typecasting
datatype*)malloc(sizeof(datatype));
This is the syntax for malloc?Please explain this,how it
work with an example? | Excel | 2 |
| we all know about the function overloading concept used in
C++ and we all learnt abt that.... but that concept is
already came in C in a very smaller propotion ... my
question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION
OVERLOADING IS USED in C language????????????? | Google | 2 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 6 |
| Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}
| ME | 3 |
| what is pointer | TCS | 1 |
| write a program to search for an element in a given array.
If the array was found then display its position otherwise
display appropriate message in c language | | 3 |
| You are given a string which contains some special
characters. You also have set of special characters. You are
given other string (call it as pattern string). Your job is
to write a program to replace each special characters in
given string by pattern string. You are not allowed to
create new resulting string. You need to allocate some new
memory to given existing string but constraint is you can
only allocate memory one time. Allocate memory exactly what
you need not more not less. | Microsoft | 2 |
| wt is d full form of c | Wipro | 1 |
| wap to print "hello world" without using the main function. | TCS | 16 |
| What is memmove? | Oracle | 1 |
| write a program to generate 1st n fibonacci prime number | | 1 |
| i want to job in your company, so how it will be possible. | TCS | 2 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| How to avoid structure padding in C? | Tech-Mahindra | 4 |
| What is macro? | IBM | 4 |
| What should not contain a header file? | | 2 |
| program for comparing 2 strings without strcmp() | | 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 |
| |
| For more C Interview Questions Click Here |