| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is sparse file? | | 1 |
| what is the use of call back function in c?tell me with
example | | 1 |
| Write a program or provide a pseudo code to flip the 2nd bit
of the 32 bit number ! (Phone Screen) | NetApp | 1 |
| what will be the result of the following program ?
char *gxxx()
{
static char xxx[1024];
return xxx;
}
main()
{
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is :
%s",gxxx());
}
a) The string is : string
b) The string is :Oldstring
c) Run time error/Core dump
d) Syntax error during compilation
e) None of these
| IBM | 2 |
| how to sort two array of characters and make a new array of
characters. | Accenture | 1 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 11 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
what will happen if you executed this code? | Ramco | 4 |
| main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs? | CitiGroup | 5 |
| In scanf h is used for | BFL | 2 |
| What is the purpose of Scanf Print, getchar, putchar,
function? | | 1 |
| How to receive strings with spaces in scanf() | | 3 |
| who did come first hen or agg | Infosys | 8 |
| how many times of error occur in C | | 7 |
| Software Interview Questions | CAT | 1 |
| int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
| Mascot | 5 |
| 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? | | 3 |
| What is an object?
| | 2 |
| hello friends
what do u mean by BUS ERROR
i got this error while i am doing my program in DATA STRUCTURES | Wipro | 2 |
| How does C++ help with the tradeoff of safety vs. usability?
| | 1 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| |
| For more C Interview Questions Click Here |