Hey guys, I'm trying to learn more about exactly what C stores on the stack, what it stores on the heap and what is considered global data etc. So any help is greatly appreciated. For example:
...
Type: Posts; User: blernblan
Hey guys, I'm trying to learn more about exactly what C stores on the stack, what it stores on the heap and what is considered global data etc. So any help is greatly appreciated. For example:
...
Thank you Salem. So the sum size of all the variables.... this means all 4 ints, and then all of the temporaries correct? Can you just tell me if temporaries usually take up a small or large amount...
Ok yes, I understand it's different for every compiler. But can we assume that certain things fall within certain ranges of bits or bytes taken up in the stack space? I mean, if ints take up 4...
Well I'm assuming all local variables and temporary results will be given their own location on the stack and all locals and temporaries will have their space allocated at the beginning of the...
Hey guys, I'm trying to count the amount of bytes of stack space that the following chunk of code will need. All local variables and temp results have their own location on the stack and their space...
Hey guys, I'm trying simply to print the property called "NodeKind" within my syntax tree. It's declared as such:
typedef enum {VarK,IdK,OpK,ConstK,ComK} NodeKind;
Every node in my tree...
Hey guys, I'm trying to print out my syntax tree using different amounts of indentation for each level in the tree. I'm not not quite sure how to achieve this in C. I've created a for loop and a...
Alright I got the thing to compile by changing the print function as follows:
void printEntries()
{
for(i = 0; i < tol; i++)
{
printf("%d", symbolTable[i]->line, ":");...
I posted the code in segments to make it easier to follow, but here's the entire file:
%option noyywrap
%{
#include <stdlib.h>
#include <stdio.h>
Hey guys, so what I'm trying to do is print each member of a struct from every struct in an array. When I try to use the following code, I get an error saying "error request for member 'line' in...