pointer tag

89 questions


1 answers
139 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
47 views
0
I have a question about the C language double pointer.

They created a two-dimensional array of chars, and they also created a pointer to it.I want the pointer to point to a[0][1], so I did (*pa)++ (I know pa is the pointer to a, *pa is the pointer to the ...

2 years ago

1 answers
47 views
0
[ C ] Multi-pointer question! I know it's easy, but I don't understand. Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

#include <stdio.h>int main() { char* astrList[3] = {Hello, World, String}; char* *ppstrList = astrList; char** *pppstrList = &ppstrList; puts(*pppstrList[0]); puts(pppstrList[2][0]); return ...

2 years ago

2 answers
43 views
0
[C] I made it as a practice, but I don't know why output comes out like this even if I keep thinking about it. It's going to be easy, but please take a look.

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

2 years ago

2 answers
105 views
0
Unhandled exception thrown: read access violation. top was nullptr.

What's the problem with the same error as the title?I'm going to watch it and follow it, but I don't know. #include <stdio.h>#include <stdlib.h>Typedef struct list {// The connection with ...

2 years ago

1 answers
51 views
0
There was a problem coding a program that was converted to backward notation and calculated.

#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#define INF 99999999//Implementing a Stack - Defining a Stacktypedef struct { char data[100]; s...

2 years ago

3 answers
141 views
0
cLanguage Parameters

When searching in a linked list, you search by creating a ListNode *p variable as shown below.void print_list(ListNode *head){ for(ListNode *p = head ; p != NULL ; p = p->link) printf(%d->,p-&g...


2 answers
87 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 answers
71 views
0
The difference between C and C++ for (memory allocation for structures)

Hello, I'm a reserve who just got discharged from the military while preparing to return to school for the second semester of the second year of computer engineering.I was curious while looking at the...

2 years ago

1 answers
52 views
0
C language: Implementing a function that verifies that a given array contains a given number

#define _crt_secure_no_warnings#define size 5#include<stdio.h>void GetIntArray(int* v, int n);int Isinclude(int* v, int n, int val);int main(){ int v[size]; int n = 5; int val; printf(Enter val:...

2 years ago
« - 8 - »

© 2024 OneMinuteCode. All rights reserved.