분류 전체보기(17)
-
Structure Type
Structure Type: A data type which the user can make on thir own using the basic data types such as int, char, bool. They can show the complex structure that can't be shown just using basic data types. While array is a list of the same data type, structure type is many basic data types formed into one new data type. The variables in structure types are called member or member variable. We use the..
2022.07.16 -
Character and Strings
Basic In-and-Out C program just manages the in and out program as it is managing files. So consoles like keyboard and monitor is managed like a automatical file. C program uses stdin and stdout to manage in and out, which combines into stdio. Stream C Program doesn't manage the file or consoles directly; they manage it using a stream, which is abstracted flow of in and out. So basically streams ..
2022.07.09 -
Memory Management
Memory Structure Program should be loaded to the memory, which is consisted of Code Area, Data Area, Stack Area, Heap Area The program is ran from the lowest memory to the highest memory. Code Area: Where the code itself is stored in the memory. The CPU takes one command by one and runs it. Data Area: Where the Global and Static variables are stored in the memory. The area is distributed as the ..
2022.07.08 -
Pointers and Arrays
Constant Pointer: Pointer that can't change the address value Pointer to Constant: Pointer that refers to a constant In this example, arr[0], arr[1], arr[2] will be same as ptr_arr[0], ptr_arr[1], ptr_arr[2], which is 10, 20, 30. The ptr_arr's value is same as arr, which we can see that the array acts as a pointer, as the address value is needed to get value by using the asterisk. So the pointer..
2022.07.02 -
Pointers
Address Value = The starting value of the data stored in the memory. In C, that address value is expressed as 1 byte of data. EX) Data type int is 4 byte, so if the address value is 0X10, 0X11, 0X12, 0X13, it would give 0X10 for the location value since that is the starting value of the data. Pointer = The variable that holds the memory address. It is also called as Pointer Variable. Operators =..
2022.07.02 -
Practice Problem Part 2 & Practice Problem #2
This is the progress I made, and since we got the efficiency and the ranking, we need to get the final value that the given capacity(200) can hold. So for each for loop, which will be ran 5 times since there is 5 values, if weight is less than capacity, which means if there is capacity to hold the weight, then that weight will be subtracted from the capacity, and the cnt will increase by its val..
2022.06.25