| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| writw a program to insert an element in the begning of a
doubly linked list | | 1 |
| Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 5 |
| what does data structure mean? | | 7 |
| How many types of linked lists what are they?
How many types of data structures? | BSNL | 5 |
| main()
{char a[10]={1,2,3,4,5,6};int x;
for(x=0;x<4;x++){ b[x]=x+'a';}
printf("%s",b);}
| | 3 |
| Write a function that accepts two numbers,say a and b and
makes bth bit of a to 0.No other bits of a should get
changed. | Scientific-Atlanta | 2 |
| what are brk, sbrk?
| Oracle | 1 |
| Would you rather wait for the results of a quicksort, a
linear search, or a bubble sort on a 200000 element array?
1) Quicksort
2) Linear Search
3) Bubble Sort
| | 2 |
| main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output? | Ramco | 6 |
| why should i select you? | Wipro | 18 |
| If we have an array of Interger values, find out a sub array
which has a maximum value of the array and start and end
positions of the array..The sub array must be contiguious.
Take the start add to be 4000.
For Ex if we have an array arr[] =
{-1,-2,-5,9,4,3,-6,8,7,6,5,-3}
here the sub array of max would be
{8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 =
26.The start and end position is 4014(8) and 4020(5). | Microsoft | 4 |
| WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N
TIMES C COMES N TIMES D COMES N TIMES AND SO ON.........
AT LAST UNTIL Z COMES N TIMES...............
| | 3 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 5 |
| HOW TO SWAP TWO NOS IN ONE STEP? | Satyam | 12 |
| write a program for even numbers? | | 8 |
| how to find the size of the data type like int,float
without using the sizeof operator? | | 7 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| write a own function for strstr | LG-Soft | 1 |
| write a program to find out number of on bits in a number?
| Huawei | 12 |
| |
| For more C Interview Questions Click Here |