| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How can I allocate arrays or structures bigger than 64K? | | 4 |
| how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
| TCS | 6 |
| how can i make a program with this kind of output..
Enter a number: 5
0
01
012
0123
01234
012345
01234
0123
012
01
0 | Wipro | 2 |
| What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"? | | 1 |
| how to do in place reversal of a linked list(singly or
doubly)? | | 1 |
| Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 3 |
| AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST? | HCL | 9 |
| how to find sum of digits in C?
| CTS | 8 |
| Program to find the value of e raised to power x using while
loop | N-Tech | 3 |
| I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it? | | 3 |
| Concat two string with most overlapped substring has to
remove "abcd"+ "cdef" = "abcdef | | 5 |
| What's the difference between a linked list and an array?
| | 8 |
| 1.what are local and global variables?
2.what is the scope of static variables?
3.what is the difference between static and global variables?
4.what are volatile variables?
5.what is the use of 'auto' keyword?
6.how do we make a global variable accessible across files?
Explain the extern keyword?
7.what is a function prototype?
8.what does keyword 'extern' mean in a function declaration?
| | 1 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| 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? | | 4 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does ‘#include<stdio.h>’ mean?
12.what is the difference between #include<> and #include”…”?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? | L&T | 4 |
| main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
| ME | 3 |
| main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
| CitiGroup | 3 |
| What do you mean by team?? | | 2 |
| what is the difference between const volatile int i
& volatile const int j; | HCL | 1 |
| |
| For more C Interview Questions Click Here |