| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a C code To reverse a linked list | Motorola | 2 |
| What is memmove? | Oracle | 1 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 5 |
| Write code for atoi(x) where x is hexadecimal string. | Adobe | 2 |
| To what value do nonglobal variables default?
1) auto
2) register
3) static
| | 4 |
| 24.what is a void pointer?
25.why arithmetic operation can’t be performed on a void
pointer?
26.differentiate between const char *a; char *const a;
and char const *a;
27.compare array with pointer?
28.what is a NULL pointer?
29.what does ‘segmentation violation’ mean?
30.what does ‘Bus Error’ mean?
31.Define function pointers?
32.How do you initialize function pointers? Give an example?
33.where can function pointers be used? | | 1 |
| Write a programme to find even numbers without using any
conditional statement? | Infosys | 3 |
| main()
{char a[10]={1,2,3,4,5,6};int x;
for(x=0;x<4;x++){ b[x]=x+'a';}
printf("%s",b);}
| | 3 |
| 1,1,5,17,61,217,?,?. | | 3 |
| Can we include one C program into another C program if yes how? | Infosys | 4 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 12 |
| regarding the scope of the varibles;identify the incorrect
statement:
a.automatic variables are automatically initialised to 0
b.static variables are are automatically initialised to 0
c.the address of a register variable is not accessiable
d.static variables cannot be initialised with any expression
| TCS | 1 |
| Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements. | | 2 |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| how to connect oracle in C/C++. | | 2 |
| 11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 7 |
| HOW TO HANDLE EXCEPTIONS IN C | | 5 |
| In scanf h is used for | BFL | 2 |
| What should be keep precautions while using the recursion
method? | | 1 |
| what is c?
| Tech-Mahindra | 5 |
| |
| For more C Interview Questions Click Here |