| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| how many header file is in C language ? | | 14 |
| what is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
} | | 10 |
| WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200? | | 2 |
| which one low Priority in c?
a)=,b)++,c)==,d)+ | | 8 |
| What is difference between the following 2 lines….
int temp = (int)(0x00);
int temp = (0x00int);
| Bosch | 3 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
what is the output? | Ramco | 4 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 16 |
| logic for generating all the combinations of the any number
of given letters.
ex:::::::::
if a,b,c,d are given the o/p should be
abcd,dcba,dbac,bcad,................
4*3*2*1 combinations............ | Infosys | 2 |
| what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason | | 3 |
| Explain the differences between public, protected, private
and internal. | | 1 |
| what is differnence b/w macro & functions | | 1 |
| Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4. | | 1 |
| Write one statement equalent to the following two statements
x=sqr(a);
return(x);
Choose from one of the alternatives
a.return(sqr(a));
b.printf("sqr(a)");
c.return(a*a*a);
d.printf("%d",sqr(a));
| TCS | 4 |
| what type of language is C? | Microsoft | 2 |
| write a fuction for accepting and replacing lowercase
letter to'Z' with out using inline function. | Temenos | 4 |
| YBJBU6 | | 1 |
| Give a fast way to multiply a number by 7 | Microsoft | 8 |
| 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 |
| |
| For more C Interview Questions Click Here |