| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a function that accepts two numbers,say a and b and
makes bth bit of a to 0.No other bits of a should get
changed. | Scientific-Atlanta | 2 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT
IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE | | 2 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| write a programe returns the number of times the character
appears in the string | | 1 |
| main()
{
clrscr();
}
clrscr();
| ME | 3 |
| void main()
{
int i=5;
printf("%d",i++ + ++i);
} | ME | 11 |
| Is the following code legal?
struct a
{
int x;
struct a b;
}
| | 3 |
| What is the memory allocated by the following definition ?
int (*x)[10];
| ADITI | 3 |
| What are volatile variables? | | 1 |
| what is the function of .h in #include<stdio.h> in c ? | IBM | 9 |
| consider the following structure:
struct num nam{
int no;
char name[25];
};
struct num nam
n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};
.....
.....
printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);
What does the above statement print?
a.8,9
b.9,9
c.8,8
d.8,unpredictable value
| TCS | 3 |
| Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program
| TCS | 12 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| create an SINGLE LINKED LISTS and reverse the data in the
lists completely | | 3 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
| Program to write some contents into a file using file
operations with proper error messages. | | 1 |
| Program to display given 3 integers in ascending order | N-Tech | 1 |
| What is alloca() and why is its use discouraged? | | 1 |
| |
| For more C Interview Questions Click Here |