15 questions
As far as I know, alloca() dynamically allocates memory in stack, not heap, and releases memory on its own when it returns from routine Then shouldn't it be recommended because it's safer because it d...
I'm trying to enter a string in a two-dimensional array, but it doesn't workIf the name of the two-dimensional array is matrix, is it correct that each character in the string is in matrix[i][j]?For e...
DYNAMIC ASSIGNMENT OF TWO-Exception occurred (0x00F55146, Project1.exe): 0xC0000005: Access violation occurred while reading location 0xFDFE01You have received the following message:#include<stdio....
int * buff = new int[10];for(auto x : buff?? ){ x = 0;}I want to initialize all the buffs that were assigned dynamically to zero, buff?Please tell me how to write down.I tried buff[], buff, etc., but ...
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...
#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) ...
#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,...
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 )...
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...
#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) {...
- 1 - | » |
© 2024 OneMinuteCode. All rights reserved.