aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming
  • num[i] is same as
Multiple choice

num[i] is same as

  1. *(num+i)

  2. *num+I

  3. *i+num

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C, array indexing num[i] is defined as *(num + i), which adds the offset i to the base address of the array and dereferences it.

Keep practicing — related questions

  • int num[ ] = {24,32,12,44,56,17}, *(num +0) refers to
  • int num[ ] = {24,32,12,44,56,17}, *(num +4) refers to
  • int[] a,b[] and int a[],b[] are same??
  • Assume the following declarations in C++ int num [5] = {3, 4, 6, 2, 1} ; int *p = num; Which of the followi...
  • The statement i++; is equivalent to
  • What will be the value of “num” after the following statements? int num; num = (5+4); num = num / 9; num = 12;
  • What will be the value of “num” after the following statements? int num; num = (5+4); num = num / 9; num = 12;
  • Output of this program : class type { int num=12; void setnum(int num){ num=num; } int getnum() { return nu...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy