| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the function of void main()? | | 6 |
| How we add our function in liabrary as liabrary function.
Exp. we want use our int factorical(int); function as int
pow(int,int); function working in math header file. | | 1 |
| totally how much header files r in c language | TCS | 4 |
| write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer) | Wipro | 7 |
| main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
| ME | 3 |
| Reverse the part of the number which is present from
position i to j. Print the new number.
eg:
num=789876
i=2
j=5
778986 | | 1 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| char ch=10;printf("%d",ch);what is the output | Accenture | 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 | 5 |
| Write a program to accept a character & display its
corrosponding ASCII value & vice versa? | | 4 |
| 1)which of following operator can't be overloaded.
a)== b)++ c)?! d)<= | Siemens | 10 |
| which one is highest Priority in c?
a)=,b)+,c)++,d)== | | 3 |
| Give a fast way to multiply a number by 7 | Microsoft | 8 |
| what is the size of an integer variable? | | 1 |
| how to find string length wihtout using c function? | | 4 |
| How many ways are there to swap two numbers without using
temporary variable? Give the each logic. | | 6 |
| Toggle nth bit in a given integer - num | Qualcomm | 2 |
| write a program to compare 2 numbers without using logical
operators? | IBM | 1 |
| can we print any string in c language without using
semicolon(;)(terminator) in whole program. | | 6 |
| write the function int countchtr(char string[],int
ch);which returns the number of timesthe character ch
appears in the string. for example the call countchtr("she
lives in Newyork",'e') would return 3. | | 4 |
| |
| For more C Interview Questions Click Here |