| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what does " calloc" do? | Cadence | 6 |
| Whats wrong with the following function
char *string()
{
char *text[20];
strcpy(text,"Hello world");
return text;
} | Qualcomm | 3 |
| Write a program to find the given number is odd or even
without using any loops(if,for,do,while) | | 2 |
| How to access or modify the const variable in c ? | HP | 4 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| 1,4,8,13,21,30,36,45,54,63,73,?,?. | Franklin-Templeton | 5 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| What is the memory allocated by the following definition ?
int (*x)(); | ADITI | 2 |
| f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
| Geometric-Software | 2 |
| What are the commands should be given before weiting C
Program i.e, Cd.. like | Infonet | 3 |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| 34.what are bitwise shift operators?
35.what are bit fields? What is the use of bit fields in a
structure declaration?
36.what is the size of an integer variable?
37.what are the files which are automatically opened when a
c file is executed?
38.what is the little endian and big endian?
39.what is the use of fflush() function?
40.what is the difference between exit() and _exit() functions?
41.where does malloc() function get the memory?
42.what is the difference between malloc() and calloc()
function?
43.what is the difference between postfix and prefix unary
increment operators? | | 2 |
| How can we see the Expanded source code and compiled code
for our source program in C? | | 1 |
| who is the founder of c | HP | 9 |
| main()
{
int a = 65;
printf(“%d %o %x”,a,a,a);
}
Output
65 101 41
Please explain me.How it is coming like that?
| Excel | 2 |
| without a terminator how can we print a message in a printf
() function. | NIIT | 5 |
| what is the stackpointer | | 2 |
| main()
{
int arr[5]={23,67};
printf("%d%d%d",arr[2],arr[3],arr[4]);
} | TCS | 6 |
| How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST | Adobe | 2 |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 6 |
| |
| For more C Interview Questions Click Here |