Frequently Asked Questions on Arrays and Pointers

Frequently Asked Questions on Arrays and Pointers, FAQ on Array and pointers, Pointers FAQ, FAQ on Array, Array Pointers interview Questions

  • I had the definition char a[6] in one source file, and in another I declared extern char *a. Why didn't it work?
  • But I heard that char a[] was identical to char *a.
  • So what is meant by the ``equivalence of pointers and arrays'' in C?
  • If they're so different, then why are array and pointer declarations interchangeable as function formal parameters?
  • So arrays are passed by reference, even though the rest of C uses pass by value?
  • Someone explained to me that arrays were really just constant pointers.
  • I'm still mystified. Is a pointer a kind of array, or is an array a kind of pointer?
  • I came across some ``joke'' code containing the ``expression'' 5["abcdef"] . How can this be legal C?
  • Since array references decay into pointers, if arr is an array, what's the difference between arr and &arr?
  • How do I declare a pointer to an array?
  • How can I set an array's size at run time?
  • How can I avoid fixed-sized arrays?
  • How can I declare local arrays of a size matching a passed-in array?
  • How can I dynamically allocate a multidimensional array?

Related Links :

No comments:

Post a Comment


If you face any Problem in viewing code such as Incomplete "For Loops" or "Incorrect greater than or smaller" than equal to signs then please collect from My Web Site CLICK HERE


More Useful Topics...

 

History Of C..

In the beginning was Charles Babbage and his Analytical Engine, a machine
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.

My 1st Program...


#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n");
printf ("\t\t\t*******Pankaj *******\n");
printf ("\t\t\t********************************\n");
printf ("\t\t\t\"Life is Good...\"\n");
printf ("\t\t\t********************************");
getch ();
}

Next Step...


#include
#include

void main ()
{
clrscr ();
printf ("\n\n\n\n\n\n\n\n");
printf ("\t\t\t --------------------------- \n\n");

printf ("\t\t\t | IGCT, Info Computers, INDIA | \n\n");
printf ("\t\t\t --------------------------- ");

getch ();

}

Hits!!!