Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 80

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 100

Answer:

# include <stdio.h>
int one_d[]={1,2,3};
main()
{
int *ptr;
ptr=one_d;
ptr+=3;
printf("%d",*ptr);
}


Answer:
garbage value


Explanation:
ptr pointer is pointing to out of the array range of one_d.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 80 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: