27 questions
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.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...
Is this the only way to use structure for C in Python?class MyStruct(): def __init__(self, field1, field2, field3): self.field1 = field1 self.field2 = field2 self.field3 = field3I used to use C (I ...
How do I create a construct in C++ structure?I want to define the constructor, but I don't know the grammar
Where is the C standard function that determines whether two instances are the same or not?I used == or is in Python, but I can't find it in C
It says Access violation but I don't know the cause.What I want is a program that takes the class, name, and department and makes it look prettyWe tried to float in two ways: return the structure and ...
While writing the header file and writing the code, I have a question, so I'm asking you.-- myheader.h#pragma oncetypedef struct node { int data; struct node *next;}NODE;typedef struct { int count; NO...
//You receive a bundle of two coordinate values from a file to construct a rectangle//Create a program that calculates the width and circumference of each and outputs it to the screen //1. Receive the...
#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) ...
Is there an easier way to initialize all object member variables to zero?Now struct Snapshot{ double x; int y ;};int main(){ struct Snapshot mystruct; mystruct.x = 0; mystruct.y = 0;}They're resettin...
« | - 2 - | » |
© 2024 OneMinuteCode. All rights reserved.