עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בנית מערכים ב-c

Featured Replies

פורסם

כאשר אני בונה מערך בC איך אני יכולה להדפיס את הכתובות של התאים בכל תא במערך?

פורסם

לעשות לולאה ולהדפיס בה את האינדקס של המערך, ולהקפיץ אותו ב++, עד שהאינדקס יגיע למצב של גודל התאים במערך.

פורסם

רמז :

אם תתני ל printf את הפרמטר p% הוא ידפיס לך את הפרמטר המתאים ככתובת (ב hex).

רמז 2 :

כשאת עושה


ptr + 1

זה בדיוק כמו לעשות

&(ptr[1]) 

ובשני המקרים, הערך שיוחזר יהיה ptr פלוס (1 * הגודל_של_הטיפוס_של_ptr_בבייטים). כלומר:


int* ptrToInt = 0;
char* ptrToChar = 0;


puts("\nptrToInt:");
printf("%p \n", ptrToInt + 1);
printf("%p \n", ptrToInt + 2);
printf("%p \n", ptrToInt + 3);


puts("\nptrToChar:");
printf("%p \n", ptrToChar + 1);
printf("%p \n", ptrToChar + 2);
printf("%p \n", ptrToChar + 3);



ptrToInt:
0x4
0x8
0xc


ptrToChar:
0x1
0x2
0x3

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.