πŸ“Š C Programming
Q. What is the output of C program with arrays and pointers.?
Code:
int main()
{
    int size=4;
    int a[size];
    a[0]=5;a[1]=6;
    a[2]=7;a[3]=8;
    printf("%d %d", *(a+2), a[1]);
}
  • (A) 8 6
  • (B) 7 6
  • (C) 6 6
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 7 6

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
208
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
86%
Success Rate