Given a piece of code
int x[10];
int *ab;
ab=x;
To access the 6th element of the array which of the
following is incorrect?
(A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .

Answers were Sorted based on User's Feedback



Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which o..

Answer / pradeep

answer: D(invalid indirection)

Is This Answer Correct ?    17 Yes 1 No

Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which o..

Answer / sandzee

d

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Interview Questions

What is the difference between union and structure in c?

0 Answers  


main() {int a=200*200/100; printf("%d",a); }

14 Answers   TCS,


write a c program to find the probability of random numbers between 1-1000

0 Answers   ADS,


What is the use of parallelize in spark?

0 Answers  


What is the advantage of a random access file?

0 Answers  


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

0 Answers  


What is typedef?

1 Answers  


what is c programing

11 Answers   Wipro,


How would you sort a linked list?

1 Answers  


What is the scope of static variables?

1 Answers  


I didn't count the ducks that I saw in line, but I do remember that one duck was in front of two ducks, another duck behind two ducks. How many ducks did I see?

2 Answers  


How can I determine whether a machines byte order is big-endian or little-endian?

0 Answers  


Categories