| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is meaning of "Void main" in C Language. | TCS | 8 |
| define function | Assurgent | 4 |
| how do u find out the number of 1's in the binary
representation of a decimal number without converting it
into binary(i mean without dividing by 2 and finding out
the remainder)? three lines of c code s there it
seems...can anyone help | | 2 |
| what will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
//Line no:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
}
//Line no 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1
| IBM | 1 |
| what is data structure
| | 4 |
| Which of the following about the C comments is incorrect ?
a.commentscan go over multiple lines
b.comments can start any where in the line
c.a line can contain comments with out any language statements
d.comments can occur within comments
| TCS | 6 |
| What is #pragma directive?how it is used in the program?
what is its advantages and disadvantages? | | 1 |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 6 |
| convert 12345 to 54321 withoutusing strig | | 3 |
| swap two integer variables without using a third temporary
variable? | | 2 |
| f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
| Geometric-Software | 2 |
| how does printf function work | | 1 |
| const char *
char * const
What is the differnce between the above tow?.
| TCS | 5 |
| #define d 10+10
main()
{
printf("%d",d*d);
} | | 3 |
| Why is conio.h not required when we save a file as .c and
use clrscr() or getch() ? | | 2 |
| What are data breakpoints? | Adobe | 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 is a headerfile?and what will be a program without it
explain nan example? | Assurgent | 5 |
| what is meant by c | | 4 |
| Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}
| ME | 3 |
| |
| For more C Interview Questions Click Here |