aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming (C/C++)
  • Given the piece of code int a[50]; int *pa; pa = a; to ac...
Multiple choice

Given the piece of code int a[50]; int *pa; pa = a; to access the 6th element, which of the following is incorrect?

  1. *(a+5)

  2. a[5]

  3. pa[5]

  4. *(*pa+5)

Reveal answer Fill a bubble to check yourself
D Correct answer

Keep practicing — related questions

  • Given the following code fragment: int A[]; int i = 0; A = new int A[4]; while (i < 4) { A[i] = 10; i = i +...
  • An array element is accessed using _______.
  • Given the following code fragment:int A[];int i = 0;A = new int A[4];while (i < 4){A[i] = 10;i = i + 1;}
  • Given the following code fragment: int A[]; int i = 0; A = new int A[4]; while (i < 4) { A[i] = 10; i = i +...
  • Which one of the following is a valid method for accessing the 3rd element of the array cust?
  • int (*p)[10]
  • int *p[10]
  • Consider the following program fragment. main() { int a,b,c; b=2 ; a= 2*(b++); c = 2*(++b); } Which one of ...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Data Structures and Algorithms (1518 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy