c tag

1304 questions


1 answers
45 views
0
Hello, the simple thing with eclipse is to receive scanf("%d", & variable name), but the output is pushed out one space at a time

In this way, the Im a student should come out first and the input should come out I haven't used scanf many times, but it's hard to find even if I google it ㅠ

2 years ago

2 answers
47 views
0
C language rock-paper-scissors game (a phenomenon problem where the results are concentrated in two)

Hello! We've implemented the problem of using enumeration to implement a game of rock-paper-scissors between computers and people. The computer's position was expressed using a random function, and wh...

c
2 years ago

1 answers
94 views
0
Fundamentals of the Picture Control Drag Method on the C++ MFC

Picture control After receiving the m_pic in CRect form, click the mouse in the coordinates, update the coordinates of the m_pic during Mouse Move, and draw it again using RedrawWindow(); but it doesn...

2 years ago

1 answers
29 views
0
[In a hurry] I don't know why there's an infinite loop in finding n-queen using c language

int is_safe(int i,int j){ int k = 1; int num = i;i--;while (i = !0){ if (board[i][j] == 1) return 0; i--;}i = (num-1);while (i = !0 && j+k <= size){ if (board[i][j + k] == 1) return 0; k++;...

c
2 years ago

2 answers
58 views
0
The print comes out weird after changing the value from C to pointer.

#include <stdio.h>#include <string.h>int main(void) { char pA[10] = seoul; char *pB = pA; *pB = busan; printf(%s, pB); printf(%s, pA);} After entering the code like this, the output value ...

2 years ago

1 answers
92 views
0
I'd like to ask you a question about reading C language file input/output data

void main(int argc, char** argv){ double *fv; int numOfVertex; int i; FILE *f; f = fopen(head_new.txt, r); // Open Stream fscanf(f, %d \n, &numOfVertex); // Read the number of vertices fv = (doubl...

2 years ago

1 answers
44 views
0
Compute double pointers in c

double * ptr = 0x0010; declaredIf you output ptr+1 ptr+2 ptr+3 in printf, it will be 0x00180x00200x0028.I don't understand why ptr+2 is not 0x0026 but 0x0028 in ptr+3.Is it just because it's not a pro...

2 years ago

1 answers
46 views
0
Free() function in C language

Use malloc() and free() when dynamically allocating memory in C language.One question is, how does the free function know the memory size dynamically allocated using malloc and solve the dynamic alloc...

c c++
2 years ago

1 answers
43 views
0
c Value output using language pointer function.

An empty function in the code below I want to print out the number 15 using printf.How do we make a function with a pointer?At this point, the main part is untouched.Code int set_to_five(){}int main()...

c
2 years ago

1 answers
109 views
0
c Questions regarding initialization of language structure

typedef struct PersonArray { Person people[NUM_USER]; int total_waiting_time; int total_waiting_people; }PersonArray;PersonArray *PeopleArray;PeopleArray->total_waiting_time = 0;PeopleArray->...

2 years ago
« - 70 - »

© 2024 OneMinuteCode. All rights reserved.