pointer tag

89 questions


1 answers
47 views
0
When do you use reference and pointer, respectively?

I know how to write reference and pointer.What I want to know isWhich is more appropriate to write reference or pointer.In some cases, this is specified (for example, the ++ operator only writes refer...

2 years ago

2 answers
40 views
0
C++ Pointer Simple Question!

typedef struct tagNode{ int data; struct tagNode* NextNode;} } Node;Regarding the above structure node sizeof(Node) : 8 Bytesizeof(Node*) : 4ByteIt was assigned as 1) How was the node's address capac...

2 years ago

1 answers
123 views
0
C language 2D array address and reference to value

Hello, I am a student studying programming, and I have a question while studying C language. int array[2][2] = {10,20,30,40}; Assuming that this arrangement exists, when you do printf(%x, array+1);The...

2 years ago

1 answers
111 views
0
What's the difference between taking a dot (.) and doing ->?

What is the difference between pointing a dot on an object (.) and doing -> in C++?I hate pointers.

2 years ago

1 answers
39 views
0
It's a C language string question

This is the first chord I made.First, let me show you the code/* <1>*/#include <stdio.h>#include <string.h>#include <stdlib.h>#define MAX_STR_COUNT 6#define MAX_TEMP_COUNT...

2 years ago

2 answers
46 views
0
(C language) I'm trying to use a pointer using the parameters I got from the function, but it turned off right away without a compilation error, so I can't catch the error

#include<stdio.h>int leaf(int *arr,int len){ int **k ; k = &arr; **(k+1)=2;// Put the secondary pointer and put the address of the arr, and it bounces}int main(){ int ab[] = {1,5,5,4,5,8,7,7...

2 years ago

1 answers
167 views
0
Check while statement string comparison conditions

int main(void){ char* str[7] = { tiger, applemango, pear, anteater, strawberry, eagle, end }; char* st = malloc(sizeof(char)*4); while (*st != end) { printf (Search word (end) : ); scanf(%s, st); f...

2 years ago

1 answers
37 views
0
[C Language Pointer] Triple Pointer Parameter Question!

//int test(char*** token_list) { char temp[3] = { apple,bee,carrot }; //Put the created temp into token_list}What should I do to get the temp into the token_list?

2 years ago

1 answers
37 views
0
Pointer variable & variable and variable difference

int main(void){ int a[10] = { 0 }; int var = 10; int* variable= &var; printf(Results: &variable=%p, variable=%p, *variable=%p, var=%p\n, &variable, variable, *variable, var); printf(Re...

2 years ago

2 answers
93 views
0
C structure pointer alignment segmentation fault question

A function that aligns the structure pointer called Record *record[]. But I don't see any wrong use of memory, so I'm asking you this question. Why does the segmentation fault appear here? All other f...

2 years ago
« - 7 - »

© 2024 OneMinuteCode. All rights reserved.