| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a program to find the sum of the array elements in c
language? | | 3 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview | Satyam | 2 |
| main()
{
int i=400,j=300;
printf("%d..%d");
}
| ME | 7 |
| What's the best way to declare and define global variables? | | 2 |
| How can I read a directory in a C program? | | 1 |
| Identify the correct argument for the function call fflush
() in ANSI C:
A)stdout
B)stdin
C)stderr
D)All the above
| Accenture | 2 |
| Evaluate the following:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
1) 10
2) 11
3) 1
| | 6 |
| Blade logic interview question.
1st round is a written tests with 15 multiple questions
from c and c++. All are simple basic question.
Like int main ()
{
Int i=65;
Return printf(“%c”, i);
}
2nd and 3rd round is technical interview.
The position for which I was interview was core UNIX and c.
Yes it is for system programming.
The company has product name blade server. For their server
they are creating their own command for their purpose.
Example cd command.
We can implement it in a c program by using the chdir()
function.
So the question asks related to PID, fork, pipe, shared
memory, signal.
Write a program in c which will act as cp command.
| BladeLogic | 1 |
| what is the function of .h in #include<stdio.h> in c ? | IBM | 4 |
| how to convert binary to decimal and decimal to binary in C
lanaguage | | 2 |
| what does data structure mean? | | 7 |
| what is the defrenece between structure and union | | 4 |
| Write a C function to search a number in the given list of
numbers. donot use printf and scanf | Honeywell | 6 |
| WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200? | | 2 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 9 |
| 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 | 12 |
| Read N characters in to an array . Use functions to do all
problems and pass the address of array to function.
1. Print only the alphabets . If in upper case print in
lower case vice versa. | | 1 |
| what is difference between array of characters and string | Accenture | 8 |
| What is the difference between char a[] = "string"; and
char *p = "string"; ? | Honeywell | 7 |
| |
| For more C Interview Questions Click Here |