| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the diff b/w static and non static variables in C.
Give some examples plz. | Wipro | 2 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| int main()
{
int *p=new int;
*p=10;
del p;
cout<<*p;
*p= 60;
cout<<*p;
}
what will be the output & why? | TCS | 3 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above | Accenture | 12 |
| what will be the output:
main(){char ch;int a=10;printf("%d",ch);} | Wipro | 25 |
| How would you write qsort? | | 1 |
| 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 |
| class foo {
public:
static int func(const char*& p) const;
};
This is illegal, why? | Google | 6 |
| i want explaination about the program and its stack reprasetaion
fibbo(int n)
{
if(n==1 or n==0)
return n;
else
return fibbo(n-1)+fibbo(n-2);
}
main()
{
fibbo(6);
}
| | 2 |
| Sir i want e-notes of C languge of BAlaguruswami book i.e
scanned or pdf file of balaguruswamy book on c
language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com
| | 2 |
| Which command is more efficient?
*(ptr+1) or ptr[1] | | 3 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 10 |
| disadvantages of realloc ? | HCL | 1 |
| main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
} | NDS | 12 |
| What is meant by
int fun const(int a, int b) {
....
...
}
| | 1 |
| Given an array of characters which form a sentence of
words, give an efficient algorithm to reverse the order of
the words (not characters) in it? | | 2 |
| WHY DO WE USE A TERMINATOR IN C LANGUAGE? | | 2 |
| 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 | 4 |
| char ch=10;printf("%d",ch);what is the output | Accenture | 11 |
| |
| For more C Interview Questions Click Here |