| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| #define f(x)
main()
{
printf("\n%d",f(2+2));
} | | 3 |
| which one of follwoing will read a character from keyboard
and store in c
a)c=getc()
b)c=getchar()
c)c=getchar(stdin)
d)getc(&c)
e)none | | 5 |
| how to make c program without a libary?
e.g.#include<stdio.h> libary is not in c progaram. | | 1 |
| define function | Assurgent | 4 |
| f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
| Hughes | 6 |
| 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 |
| what is use#in c | | 3 |
| write an interactive program to generate the divisors of a
given integer. | TCS | 4 |
| Difference between Class and Struct.
| Motorola | 6 |
| main()
{
float a=3.2e40;
printf("%d",a);
} | Satyam | 5 |
| Total of how many functions are available in c? | | 2 |
| Write a programme to find even numbers without using any
conditional statement? | Infosys | 3 |
| how to find that no is int or float? | | 5 |
| how to print value of e(exp1)up to required no of digits
after decimal? | | 1 |
| 1. Write the function int countchtr(char string[ ], int ch);
which returns the number of times the character ch appears
in the string.
Example, the call countchtr(“She lives in NEWYORK”, ‘e’)
would return 3.
| | 2 |
| Who is invented by c? | Infosys | 14 |
| for(i=0;i=printf("Hello");i++);
printf("Hello");
how many times how will be printed????????? | | 4 |
| #define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
| NDS | 9 |
| what is use of loop? | Infosys | 6 |
| |
| For more C Interview Questions Click Here |