help me guys pleas !! I had posted those question a few days ago I was looking f
ID: 3677692 • Letter: H
Question
help me guys pleas !!
I had posted those question a few days ago I was looking for some explanations
but I got definitions instead! I appreciate your cooperation anyway.
These my subjects I need help with, and how they work , with reading examples.
Scanning
Parsing
Scope Rules
Object Lifetime and Storage Management.
I need theme to be like this example pleas. (Below)
So I decided to post my question with example on Scope Rules. To be my request clear,
It’s pretty much like giving someone directions wants to go from city to another
In programming we have to know the extension guidelines and how it functions. When we characterize a variable and give it a name and a sort. At that point we allot a number to this variable. On the off chance that we characterize another variable with the same name and sort then we will some time get a blunder. Be that as it may, in the event that we characterize the variable in another extension it will work. The way the compiler see it is that if the variable is inside the same extension then it's a mistake yet in the event that it's in another degree it will work differently.etc
Explanation / Answer
Scanning is a process that converts a string in a program from a string of characters to a string of tokens
For example, any one of the following C statements
x3 = y + 3;
x3 = y + 3 ;
x3 = y+ 3 ;
but not
x 3 = y + 3;
would be grouped into the lexemes x3, =, y, +, 3, and ;.
Parsing is a process that converts a text or string into a data structure usually a tree which is suitable for later processing.In top down parsing the top-down parsers start from the root of the tree and proceed downward; whereas, bottom-up parsers start from the leaves and proceed upward. The commonly used top-down and bottom parsers are not universal.
Scope rules:
1.The variables inside a block or a function are called local variables
2.The variables outside of all functions are called global.
example:
golbal variable example:
value of g=10 here