C Interview Report
- 0of 0 votes
AnswersWhat does the following represent?
- CC++ June 06, 2012 in United States
void (*abc(int, void (*def)()))();| Report Duplicate | Flag | PURGE
C - 0of 0 votes
AnswersDifferentiate the above declarations.
- CC++ June 06, 2012 in United States
1. const char *a;
2. char* const a;
3. char const *a;
For each of the above, which operation below is legal and which is not?
*a='F'
a ="Hi"| Report Duplicate | Flag | PURGE
C - 0of 0 votes
AnswersWhat would be the output for the following code fragment?
- CC++ June 06, 2012 in United States
void foo(int b[][3] );
main()
{
int a [3][3]= { { 1,2,3} , { 4,5,6},{7,8,9}};
foo(a);
printf("%d" , a[2][1]);
}
void foo( int b[][3])
{
++ b;
b[1][1] =9;
}
(a) 8
(b) 9
(c) 7
(d) None of the above| Report Duplicate | Flag | PURGE
C - 0of 0 votes
AnswersWhat does the following do:
- CC++ June 06, 2012 in United States
void afunction(int *x)
{
x=new int;
*x=12;
}
int main()
{
int v=10;
afunction(&v);
cout<<v;
}
a) Outputs 12
b) Outputs 10
c) Outputs the address of v| Report Duplicate | Flag | PURGE
C - 0of 0 votes
AnswersWhat would be the output for the following code fragment?
- CC++ June 06, 2012 in United States
main()
{
int i=300;
char *ptr = &i;
*++ptr=2;
printf("%d",i);
}| Report Duplicate | Flag | PURGE
C