| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Suppose I want to write a function that takes a generic
pointer as an argument and I want to simulate passing it by
reference. Can I give the formal parameter type void **, and
do something like this?
void f(void **);
double *dp;
f((void **)&dp);
| | 1 |
| program to find the second largest word in a paragraph
amongst all words that repeat more thn twice | iGate | 3 |
| can you explain in brief what is "r+" mode in a file... i
know that it si used to read and modify rhe existing
content.... but explalanation about the file pointer in "r+"
mode i wann to know??????????? | Cognizent | 1 |
| What character terminates all strings composed of character
arrays?
1) 0
2) .
3) END
| | 3 |
| let's take a code
struct FAQ
{
int a;
char b;
float c;
double d;
int a[10];
}*temp;
now explain me how the memory will be allocated for the
structure FAQ and what address will be in the structure
pointer (temp).................... | | 7 |
| write a function to find whether a string is palindrome or
not and how many palindrome this string contain? | | 1 |
| suppose we use switch statement and we intilize years name
using enum statement like(jan,feb,mar,------dec) we take
integer value as an input .question is that the month which
we analyz is from 0 to 11 bt if i enter 12 than how he
again starts from begning and print jan | | 1 |
| hat is a pointer? | Assurgent | 3 |
| How can I allocate arrays or structures bigger than 64K? | | 4 |
| 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 |
| What is the difference between typeof(foo) and myFoo.GetType()? | | 1 |
| what is the code for getting the output as
*
**
*** | Caritor | 5 |
| 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 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | Satyam | 2 |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| Is reference used in C? | | 1 |
| What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
} | ADITI | 14 |
| What is alloca() and why is its use discouraged? | | 1 |
| design and implement a program that reads floating-points
numbers in a sentinel-controlled loop until the user
terminates the program by entering zero.your program should
determinate and print the smallest,largest and average of
the supplied numbers. | | 1 |
| how to estimate the disk access time?
e.g. the time between read one byte and another byte in the
disk. | Google | 3 |
| |
| For more C Interview Questions Click Here |