Naresh it c notes pdf


  • C Language Course Material
  • C#.Net Material Pdf free Download NareshIT – Part 1
  • DK Goel Solutions Chapter 18 Bills of Exchange
  • Reading Excel Files In C# .NET
  • C#.Net Material Pdf free Download NareshIT – Part 2
  • C Language Course Material

    What happens when a c program is loaded into memory? Where are the different types of variables allocated? Why do we need two data sections, initialized and un-initialized?

    If we initialize a static or global variable with 0 where will it be stored? Even though the scope of global and static variables are different, why are they stored in same section i. We know that a C program which is compiled to an executable and loaded into memory for execution has 4 main segments in memory. They are data, code, stack, and heap segments. Global and function static variables are allocated in the data segment. They are loaded in the code segment.

    When the program executes, function calls are made. Executing each function requires allocation of memory, as if in a frame to store different information like the return pointer, local variable…etc. When we do dynamic memory allocation, such as the use of the malloc function, memory is allocated in the heap area.

    Static and Dynamic Segments The data and code segments are of fixed size. When a program is compiled, at that point itself, the sizes required for the segments are fixed and known. Hence they are known as static segments. The sizes of the stack and heap areas are not known when the program gets compiled.

    Also it is possible to change or configure the sizes of these areas i. So, these are called dynamic segments. Data segment:- the data segment is to hold the value of those variables that need to be available throughout the life time of the program. So it is obvious that global variables should be allocated in the data segment. How about local variables declared as static? Yes, they are also allocated in the data area because their values should be available across function calls.

    If they are allocated in the stack frame itself, they will get destroyed once the function returns. The only option is to allocate them in a global area. Hence, they are allocated in this segment. So, the life time of a local static variable is that of the life time of the program. There are two parts in this segment. The initialized data segment and u-initialized data segment. When variables are initialized to some value other than 0 or which is different value , they are allocated in the initialized segment.

    When the variables are un initialized they get allocated in the un-initialized data segment. This segment is usually referred to with cryptic acronym called BSS. It stands for block starting with symbol and gets its name from old IBM systems which had that segments initialized to zero. The data area is separated into two based on explicit initialization, because the variables that are need to be initialized need not be initialized with zeros one by one.

    However the variables that are not initialized need not to be explicitly initialized with zeros one by one. Instead the job of initialization of variables to zero is left to the operating system to take care of. This bulk initialization can greatly reduce the time required to load. When we want to run an executable program, the OS starts a program known as loader.

    When this loads the file into memory, it takes the BSS segment and initializes the whole thing to zeros. That is why the un-initialized global data and static data always get the default value of zero. The layout of data segment is in the control of the underlying OS.

    However some loaders give partial control to the users. This information may be useful in applications such as embedded systems. The data area can be addressed and accessed using pointers from the code. Automatic variables have an overhead in initializing the variables each time they are required, and code is required to do that initialization.

    However, variables in the data area do not have such runtime overhead, because the initialization is done only once and that too at loading time. Code segment:- the program code is where the executable code is available for execution. This area is also known as the text segment and is of fixed size. This can be accessed only by function pointers and not by other data pointers.

    Another important piece of information to take note of here is that the system may consider this area as a read only memory area and any attempt to write in this area can lead to undefined behavior. Stack and heap segments:- to execute the program two major parts of the memory used are stack and heap. Stack frames area created in the stack for functions and in the heap for dynamic memory allocation. The stack and heap are un-initialized areas. Therefore whatever happens to be in the memory becomes the initial garbage value for the objects created in that space.

    The local variable and function arguments are allocated in the stack. For the local variables that have an initialization value, code is generated by the compiler to initialize them explicitly to those values when the stack frames are created. For function parameters the compiler generates code to copy the actual arguments to the space allocated for the parameters in the stack frame.

    Here, we will take a small program and see where different program elements are stored when that program executes. The comments explain where the variables get stored.

    The Article is just to let people know about what others are doing to convert their Black Monet into white money currently in India. In addition to those mentioned below there are many other methods which people use to convert their black money into white money.

    Give him the amount you want to convert your cash into white. He would give you a purchase bill to show that you have sold silver utensils to him. On the amount of the cheque when you file your return you will have to pay no capital gain tax as Silver utensils are Personal effects and capital gain does not arise on sale of personal effects. There you go, the money is white now!!! X : A Business man who wants to convert his black money to white.

    Property: Cost of Acquisition: Rs. Y: A Salaried person who wants to convert his white money to black may be because he has to make payment in black for the property purchased by him. X enters into an agreement with Mr. Y for the sale of property for Rs. Y and balance shall be paid within 3 months else advance money shall be forfeited. Modus Operandi: Mr. Y makes payment of Rs. X by way of a cheque as the advance money and Mr.

    X in turns gives the black money to Mr. Y of the same amount. Now, Mr. Y intentionally fails to make balance payment within the due time and the amount is forfeited by Mr.

    In this manner black money of Mr. X is converted to white money. The money is white now!!! CASE 3: Another popular way of converting black into white money is by getting a gift from a relative. For this modus operandi, the relative must possess white money. For example, you have some black money say Rs.

    You can ask your relative to gift you Rs. Here 56 2 vii is not attracted as gift is received from a relative. CASE Converting black to white by way of cheque People also give the black money to a person say a family member or a friend and take a cheque from them.

    They show that as a loan receipt and thus they can temporarily convert their black money into white. Then they again give them a check as a repayment of loan and receive cash which converts white to black again, but during the time the loan is outstanding, they convert their black into white, but people who do this are not aware that Section 68 on loans is applicable and you will have to prove the creditworthiness as well as the genuineness of transactions to the IT Department or else the loan receipt will be treated as income from undisclosed sources.

    CASE 5: Another popular way of converting black into white money is showing income in cash like tuition income or any other professional fees. Just pay the tax at normal rate and your money is white now!!!! Also people make investment where it is allowed to invest in cash and where the maturity is tax free for example buying an insurance policy where you are not required to show all your premiums and the maturity is tax free.

    No ITO is going to check premium of more then last two years and it is a small example. People are paying huge cash premiums everyday. In case of this small premium, the cost of investigation exceeds the benefit to the exchequer so the ITO will give a test check for at the max last two years. I just want them to be aware regarding these false practices. I encourage open discussion regarding this article but advices, opinions, suggestions which may land the opinion seekers into trouble later on are not encouraged.

    I trust that a tax planning should be done in such a way that it can stand the test of the legal battle of course subject to debates. Please note Department has started Degree Profiling and keeping a Vigil on our every Transaction which made it very difficult to hide any illegal Transaction and increased Penalty for Tax Evasion and also introduced stringent provisions which may even lead a Taxpayer in Jail for Tax Evasion.

    Author Email — professionalsansaar gmail.

    The Article is just to let people know about what others are doing to convert their Black Monet into white money currently in India. In addition to those mentioned below there are many other methods which people use to convert their black money into white money. Give him the amount you want to convert your cash into white.

    C#.Net Material Pdf free Download NareshIT – Part 1

    He would give you a purchase bill to show that you have sold silver utensils to him. On the amount of the cheque when you file your return you will have to pay no capital gain tax as Silver utensils are Personal effects and capital gain does not arise on sale of personal effects. There you go, the money is white now!!!

    X : A Business man who wants to convert his black money to white.

    DK Goel Solutions Chapter 18 Bills of Exchange

    Property: Cost of Acquisition: Rs. Y: A Salaried person who wants to convert his white money to black may be because he has to make payment in black for the property purchased by him. X enters into an agreement with Mr. Y for the sale of property for Rs.

    Y and balance shall be paid within 3 months else advance money shall be forfeited. Modus Operandi: Mr. Y makes payment of Rs. X by way of a cheque as the advance money and Mr. X in turns gives the black money to Mr. Y of the same amount. Now, Mr. Y intentionally fails to make balance payment within the due time and the amount is forfeited by Mr.

    In this manner black money of Mr. Then in column B2, we have a reference to cell A2. We will try and extract these styling elements out later. Again, this is so we can test getting both the formula and the computed value, but this time across different sheets. EPPlus When I first started hunting around for parsing excel in.

    Reading Excel Files In C# .NET

    Worksheets["First Sheet"]; Console. WriteLine "Sheet 1 Data" ; Console. Worksheets["Second Sheet"]; Console.

    It picks up formulas vs text perfectly! The styles on our first sheet was also pretty easy to get going. The code to read our data using NPOI looks like so : ….

    C#.Net Material Pdf free Download NareshIT – Part 2

    I blew a bunch of time on this to try and work out the best way to use NPOI and the documentation is awful. I saw they had a link to a tutorial on how to read an Excel file which looked promising, but it was literally reading the spreadsheet and then dumping the text out. Almost every google answer will lead you to StackOverflow with people using NPOI with such specific use cases that it never really all pieced together for me.

    NET Core. RegisterProvider System. Open "Book. Open, FileAccess. WriteLine reader.


    Naresh it c notes pdf