| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the value of 'i'?
i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
| Cadence | 4 |
| find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
| TCS | 4 |
| write a program that print itself even if the source file is
deleted? | | 1 |
| Which of the following about automatic variables within a
function is correct ?
a.its type must be declared before using the variable
b.they are local
c.they are not initialised to zero
d.they are global.
| TCS | 3 |
| how to make c program without a libary?
e.g.#include<stdio.h> libary is not in c progaram. | | 1 |
| what is meant by the "equivalence of pointers and arrays" in
C? | Satyam | 3 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
| CitiGroup | 4 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 11 |
| code for copying two strings with out strcpy() function. | | 5 |
| 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 |
| How can I invoke another program from within a C program? | | 6 |
| define function | Assurgent | 4 |
| how to convert binary to decimal and decimal to binary in C
lanaguage | | 4 |
| read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x<MIN)
x=-1;
x=50;
if the initial value of x=200,what is the vlaue after
executing this code?
a.200
b.1
c.-1
d.50
| TCS | 2 |
| main()
{
int arr[5]={23,67};
printf("%d%d%d",arr[2],arr[3],arr[4]);
} | TCS | 6 |
| Given an array of characters, how would you reverse it? How
would you reverse it without using indexing in the array? | | 1 |
| what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
} | | 2 |
| Total of how many functions are available in c? | | 2 |
| Give a method to count the number of ones in a 32 bit number? | | 1 |
| Write a program or provide a pseudo code to flip the 2nd bit
of the 32 bit number ! (Phone Screen) | NetApp | 1 |
| |
| For more C Interview Questions Click Here |