89 questions
#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 ...
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...
struct Person { char name[20]; int age; char address[100] };int main{ { struct Person p1;struct Person *ptr;ptr = &p1; } } Even if there is no third line in int main, the variable ptr in the secon...
Hello.I have a question about pointer and arrangement in C language.Why do I see the same number as 1 if I do p-myarr like the following code?If you calculate based on the output address value, you sh...
#include<stdio.h>void MaxAndMin(int * arr,int size,int **mxptr,int **mnptr){ int * max,* min; int i; *max=*min=arr[0]; for(i=0;i<size;i++) { if(*max<arr[i]) *max=arr[i]; if(*min>arr[...
I think it's enough to receive a single pointer with the C binary tree insertion/deletion parameterIt's hard to understand why a book or a few blogs receive double pointers as parameters.The following...
Hello.There are source codes from 1 to 3 as shown below.Which is the better way to initialize, number 1 or number 2?And if you initialize it as duplicate(?) like number 3, there is no error in the bui...
`python>inputfile=open(ALE.txt,r)outputfile=open(ALE2.txt,w)list1=[]for line in inputfile:Team,Won,Lost=line.split(',')Won=int(Won)Lost=int(Lost)Percentage=round((Won)/(Won+Lost),3)list1.append([Perce...
int arr[2][3] = { {1,2,3},{4,5,6} }; int(*parr)[3];parr = arr;I'm not sure what int (*parr)[3]; means in the above code.The arr array declared in the first line consists of two rows and three rows(*pa...
int **A = { {1, 2, 3, 4} {5, 6, 7 ,8} {9,10,11,12} {13,14,15,16}};A = &A[0] Like A+2 =&A[2]Can I express an int** that refers to an address that corresponds to 11...?
« | - 3 - | » |
© 2024 OneMinuteCode. All rights reserved.