pointer tag

89 questions


3 answers
56 views
0
a code that rearranges alphabets entered using a pointer in ascending order of ASCII code

I would like to sort the random strings of the alphabet you entered in ascending order of ASCII code and print them out.exampleOriginal string: bfGageGaheifhalenbcuafuhneixlDbfuhflfi0After sorting: DG...

2 years ago

1 answers
59 views
0
If you access the structure in the vector, it will fall off.

Please help me.When I try to access the vector of the structure (elmCom) that I define, the program suddenly ends.The vector (named elcom and very confusing) is defined in the header file, then the co...

2 years ago

4 answers
56 views
0
C/C++ pointers for memory savings/acceleration

This is a rudimentary question.I learned that C/C++ saves memory and speeds by securing and delivering non-simple models (such as int and double) with a pointer.Should all self-made classes and struct...

2 years ago

2 answers
51 views
0
I'd like to talk about pointers.

Regarding the pointer, I have a question due to lack of studyI don't know if it's the correct syntax because I don't have an environment where I can use my smartphone right now. void f(int*a) {*a=5;}i...

2 years ago

1 answers
91 views
0
Difference between Reference and Pointer and a pointer

I know that using references makes it easier to read and write code,What exactly is the difference between the two?

2 years ago

1 answers
100 views
0
I'm C Newbie. Please tell me how to use a function pointer

Why is the pointer so hard?It's hard to use a normal pointer. A function pointer?How do I turn over the factor?Please tell me how to use it, not too difficult ㅜ

2 years ago

1 answers
111 views
0
Why is a[1] == 1[a] in the C array?

It's a code that my friend sent me, saying she found a weird function1[a] It compiles well and executes well.What's going on here?int main(){ int* a = (int*)malloc(sizeof(int)*2); a[0] = 1; a[1] = 2; ...


1 answers
124 views
0
Does C know how to "free" free?

It's possible to point at each type of pointerWho tells me how many pointers to write in an array should be released when memory is released?When you hand over an array to a function, you hand over th...

2 years ago

1 answers
118 views
0
Use a pointer to address elements in an array

#include <stdio.h>#include <string.h># # define MAX 50typedef struct contact_st{ char Name[10]; char PhoneNumber[13];} } Contact;Contact PhoneBook[MAX];int contactSwap(void* arr, int i, in...

2 years ago

1 answers
78 views
0
I don't know exactly why I use %lf when I input real numbers in the scanf function.

I heard that if you receive a real data value from the scanf function, the data type of the factor value is automatically changed from float type to double type, so in that way, the int type data valu...

2 years ago
« - 2 - »

© 2024 OneMinuteCode. All rights reserved.