| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the difference between static and global variables? | | 1 |
| what is the output of the following program?
#include<stdio.h>
void main()
{
float x=1.1;
while(x==1.1)
{
printf("\n%f",x);
x=x-0.1;
}
} | | 4 |
| #include <stdio.h>
int main ( int argc, char* argv [ ] )
{
int value1 = 10;
int value2 = 5;
printf ( "\n The sum is :%d", value1 | value2 );
}
This is the answer asked by some one to add two numbers
with out using arithmetic operator?Yes this answer is write
it given out put as 15.But how?????
what is need of following line?
int main ( int argc, char* argv [ ] )
how it work?what is the meaning for this line?
please explain me.Advance thanks | Excel | 4 |
| sir,
i cannot find the way how to write aprogram by using
array on queue | IISIT | 1 |
| 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 |
| What are advantages and disadvantages of recursive
calling ? | HP | 11 |
| #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 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| what is memory leak?
| | 3 |
| write a program to print the all 4digits numbers & whose
squares must me even numbers? | Virtusa | 2 |
| write the program for maximum of the following numbers?
122,198,290,71,143,325,98 | | 4 |
| CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION. | | 6 |
| what is use of loop? | Infosys | 6 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason | | 3 |
| Which of these statements are false w.r.t File Functions?
i)fputs() ii)fdopen() iii)fgetpos() iv)ferror()
A)ii B)i,ii C)iii D)iv
| Accenture | 5 |
| write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer) | Wipro | 7 |
| what is the difference between these initializations?
Char a[]=”string”;
Char *p=”literal”;
Does *p++ increment p, or what it points to?
| | 2 |
| what is the output?
#define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t)
float gfloat;
main()
{
float a=1.12,b=3.14;
fun (a,b,float);
printf("na=%4.2f,b=%4.2f",a,b);
}
A)Error in Defining Macro
B)a=1.12,b=3.14
C)a=3.14,b=1.12
D)None of the Above
| Accenture | 2 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| |
| For more C Interview Questions Click Here |