I only repeated this part just to make sure that when adding elements to ptr, the addresses didn't change.
I was just making sure each element had the same number of bytes allocated to it. I...
Type: Posts; User: RicsterB
I only repeated this part just to make sure that when adding elements to ptr, the addresses didn't change.
I was just making sure each element had the same number of bytes allocated to it. I...
After allocating a single large block of memory with the specified size using malloc function, then you use the free() function to deallocate that single large block of memory.
There is this one...
Okay, as I've researched, when the executable is created, it gets loaded into RAM, but is the diagram showing how the RAM processes the executable while it runs?
Excuse my confusion. I am learning about how C programs are executed in memory. Here is the diagram:
16282
So, once a C program has been compiled and the executable has been created, the...
As far as I know, the stack is a region in RAM that stores local variables created by each function (including the main() function). The stack is a "LIFO" (last in, first out) data structure that is...
It's not actually a database. It's a "pseudo" database where information will be stored in a text file, then the program will later loop through the file and display what the information added to the...
Only one image, and the size depends on whether it's a jpg or png file. If I were to obtain the binary representation of the image, would I use dynamic memory allocation (storing the binary into an...
I want to start a new C project that will help me better understand pointers and memory management. I've been using languages like Java and PHP, so I never had to deal with concepts like pointers,...
Say I have a text file called "accounts.txt" that contained the following:
The format is like this: (account number)?(username)?(password)
Now the following code is to search through the...
I got another question, when I try to execute the following:
#include <stdio.h>
#include <string.h>
void Login()
{
char uname[20];
So theres no need for the pointers? Just execute the function as is, and clear the console using: system("clear")
BTW, i'm building this app on Linux.
Instead of saying "page", I could have said Welcome menu and Login menu.
Hi. This is my first C project (I self taught myself C) and have started a basic project where users can create, update, view and manage, check and delete bank accounts. It's all terminal/command...