location tag

22 questions


1 answers
98 views
0
The memory value allocated to create a student information management program with a connection list changes.

Making a student management system or somethingThe files are main, student.cpp, student.h When I add student data, I want to use Link List to implement it I received the menu number through the main d...

2 years ago

1 answers
115 views
0
Is the Ionic Application operating in background mode?

Hello.Currently, we are creating apps through ionic-framework.Due to the nature of the app, the latitude and longitude values must be updated periodically on the server If the user leaves the app with...


1 answers
110 views
0
Data search question in C language binary search.

#include<stdio.h>#include<stdlib.h>int idxsearch(int ar[], int first, int last, int target) { int mid = (first + last) / 2; if (first > last) return -1; else { if (ar[mid] == target) ...


1 answers
106 views
0
Problem occurs with dynamic deallocation of C language pointer secondary array.

#include stdio.h#include stdlib.h unsigned int Node_size; float Mean_degree; int (*bin)[2] , i , j , k=0 , l=0; printf(Node size :?); scanf(%d,&Node_size); printf(Mean degree :?); scanf(%f,...

2 years ago

1 answers
125 views
0
To output decimals

int main(void){ int num = 0; int* a = NULL; printf(>Positive Input : ); scanf(%d, &num); a = (int*)malloc(num-2); search(a,num); for (int i = 0; i < num-2; i++) { if(a[i-2] == 0) printf(X )...


1 answers
144 views
0
Ask about printing strings using the C language recursive function.

If you output a string of length 3 using two alphabets ab, aaaaababaabbbaababbbabbbYou have to make it come out like this.A two-dimensional character array is dynamically assigned, and the Distr funct...


2 answers
77 views
0
C Dynamic Allocation Why can I modify or access memory that I released with free()?

#include <stdio.h>#include <stdlib.h>int main(void) { int *pList = NULL, i = 0; pList = (int*)malloc(sizeof(int) * 3); pList[0] = 10; pList[1] = 20; pList[2] = 30; for(i=0; i <3; ++i) {...

2 years ago

1 answers
132 views
0
[C question] How should I release the dynamic allocation in this situation?

#include <stdio.h>#include <stdlib.h>char *Mystrrev(char *string) { int nLength = 0; char *Mystr = NULL; for(int i = 0; string[i] != '\0'; i++) nLength++; Mystr = (char*)calloc(nLength + 1...


2 answers
60 views
0
[C] Can memory dynamic allocation only be allocated to the memory of the pointer?

#include <stdio.h>#include <string.h>#include <stdlib.h>int main(){ char *pszData; char first[20], second[20]; gets_s(first, sizeof(first)); pszData = (char*)malloc(sizeof(first)); s...

2 years ago

2 answers
80 views
0
C++ Dynamic Assignment Structure Pointer, question for use with other functions

Hi, everyone.I made a simple code. I'd like to hear advice from experts who know the problem.#include <iostream>using namespace std;int CountPlayer;struct SUTDA{ char Name[20];};void Input(){ co...

« - 2 - »

© 2024 OneMinuteCode. All rights reserved.