| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| program to find middle element of linklist? | Huawei | 1 |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| What is structure packing ? | HP | 1 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 4 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| #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 |
| 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 |
| write a own function to compare two strings with out using
stringcomparition function? | LG-Soft | 3 |
| hello friends
what do u mean by BUS ERROR
i got this error while i am doing my program in DATA STRUCTURES | Wipro | 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 |
| 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 |
| write a program to find the sum of the array elements in c
language? | | 8 |
| what is difference between ++(*p) and (*p)++ | Accenture | 15 |
| Tell about strtok & strstr functions | Motorola | 2 |
| pgm in c to reverse string by word using array(god is love
becomes love is god)
(no additional array can used,space is only delimiter
between words ) | Persistent | 1 |
| write a function for strtok()?? | Verifone | 1 |
| Write a C program to print 1 2 3 ... 100 without using
loops? | | 5 |
| write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
| Motorola | 2 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 5 |
| totally how much header files r in c language | TCS | 4 |
| |
| For more C Interview Questions Click Here |