| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is link list?
| | 2 |
| write program on arrays
| GE | 2 |
| what is pointer | TCS | 1 |
| code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3 | | 3 |
| 5. What kind of sorting is this:
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort
| Accenture | 2 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | Satyam | 2 |
| Write a program to find the given number is odd or even
without using any loops(if,for,do,while) | | 2 |
| 1,4,8,13,21,30,36,45,54,63,73,?,?. | Franklin-Templeton | 5 |
| What is the purpose of Scanf Print, getchar, putchar,
function? | | 2 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 15 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| for example user gives input as " 20 or 20.0 or rs 20.0 or
20.00 or rs20 and so .. on " and the output should be
stored as " rs.20.00 " in a variable | | 2 |
| what is Structural oriented language?
give some example of this language.....? | | 1 |
| What is the function of ceil(X) defined in math.h do?
A)It returns the value rounded down to the next lower
integer
B)it returns the value rounded up to the next higher integer
C)the Next Higher Value
D)the next lower value | Accenture | 3 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| what will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
//Line no:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
}
//Line no 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1
| IBM | 1 |
| Which of the following are valid "include" formats?
A)#include and #include[file.h]
B)#include (file.h) and #include
C)#include [file.h] and #include "file.h"
D)#include <file.h> and #include "file.h"
| Accenture | 14 |
| Write a program to find the smallest and largest element in
a given array in c language | Microsoft | 3 |
| c programming of binary addition of two binary numbers
| | 1 |
| what is the advantage of software development | | 1 |
| |
| For more C Interview Questions Click Here |