| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? | Wipro | 2 |
| we have to use realloc only after malloc or calloc ? or we
can use initially with out depending on whether we are
using malloc or calloc in our program ? | | 1 |
| # define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }
the output of the program is
a.8
b.6
c.7
d.none
| TCS | 5 |
| 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 |
| a 'c' program to tell that the set of three coordinates lie
on a same line | Persistent | 1 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above | Accenture | 13 |
| What is the output of the following program
#include<stdio.h>
main()
{
int i=0;
fork();
printf("%d",i++);
fork();
printf("%d",i++);
fork();
wait();
} | ADITI | 5 |
| What is sparse file? | | 1 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 14 |
| what is the associativity of bitwise OR operator? | | 1 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | | 7 |
| how to impliment 2 or more stacks in a single dimensional
array ? | iFlex | 1 |
| the code is::::: if(condition)
printf("hello");
else
printf("world");
WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH
HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE
ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT
MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS,
RECURSION ARE ALLOWED........................ | IBM | 9 |
| WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200? | | 2 |
| prototype of sine function. | Cadence | 2 |
| is compiler do read the data line by line or not.
?? | LG-Soft | 3 |
| #define DCHAR char*
typedef char* TCHAR;
if using these following variables will be declared like
DCHAR ch1, ch2;
TCHAR ch3, ch4;
then what will be types of ch1, ch2, ch3 and ch4?
| NDS | 1 |
| what is difference between array and structure?
| TCS | 19 |
| |
| For more C Interview Questions Click Here |