89 questions
In a 32-bit architecture, how does this code output?#include <stdio.h>int main(void) { int x[4]; printf(%p\n, (void*) (x)); printf(%p\n, (void*) (x + 1)); printf(%p\n, (void*) (&x)); printf(...
Why do you put an asterisk before the name, not after the type, when declaring the C pointer?It's usually declaredint* myVariable; instead of int *myVariable;Why do you put an asterisk in front of you...
I'm learning pointers for the first time, but I'm still confusedI know that & refers to the address of the variable and * is attached to the variable to be used as a pointerI don't know how to wri...
I have a question while studying the language pointerAny language is basically in memory We have no choice but to use variables and addressesIs it because Python doesn't need an address?Or is it becau...
Hi, how are you?I am a student who forgot all the C and C++ I learned at school in the military and is currently studying Java and C# as an intern part-time job and hobby.Currently, I am taking an int...
#include <stdio.h>#include <conio.h>int main(){ int a[3][5] = { {1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15} }; printf(%d, (a + 1)); printf(\n%d, *(a + 1)); _getch();}The res...
#include <stdio.h>int main(){ int a = 10; int *pa = &a; *pa = 20; printf(%d, a); return 0;}In this code, the 10 assigned to the memory digit of a is changed to 20 Is it right to change it to...
void swap(int *a, int *b){ int temp=*a; *a=*b; *b=temp;}As an example of call by reference in this way, we use pointers in frequently used functions.While studying the memory area, I found out that t...
#include<stdio.h>void rotate(int(*ptr)[4]){ int i,j; int temp[4][4]; for(i=0;i<4;i++) { for(j=0;j<4;j++) { temp[i][j]=ptr[3-j][i]; } } for(i=0;i<4;i++) { for(j=0;j<4;j++) { pt...
Can anyone explain how the following three methods of declaring a pointer are different?
« | - 6 - | » |
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.