เขียนโปรแกรมเพื่อเข้าถึงอาเรย์ส่วนประกอบการใช้ชี้ประเด็น

รหัสตัวอย่าง

1
0

N

#include<stdio.h>

int main(){

    int arr[] = {1,3,4,5,6,7,8};
    int *ptr = &arr; //storing address of the first element in array in the ptr

  	//accessing the elements of the array using ptr
    for(int i=0;i<7;i++)
        printf("%d ",*(ptr+i));
  	//here i represents the value to be added to the base address
    return 0;
}

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่