Paper Details  
 
   

Has Bibliography
22 Pages
5416 Words

 
   
   
    Filter Topics  
 
     
   
 

Exam tests

their own time on own PCs.Work done for recognition by peer group.Major achievements so far:LinuxApacheGNU"enumerated" types: Explain where these can be useful. Provide a suggestion for a standardized naming style for such types. (1 mark) Enums can be useful when you would like to pass a secure limited range argument to a function.The enumerated type name should start with a ‘E’ and then a noun starting with a capital letter, the actual types should start with a ‘e’ with the rest of the word capitalised.Explain how data structures are created in the static data segment, the stack, and the heap. How does their allocation relate to their lifetime? (2 marks) Static data structures are allocated memory and their lifetime lasts for the entire execution. Automatic data structures are placed on the stack when a function is called. Their lifetime is as long as the lifetime of the function.Dynamic data is allocated to the heap, when a program specifically asks for this occurrence. Its lifetime is programer controled.What data are placed in the "static data segment"? When and how are they initialized? (1 mark) Static variables are placed in the static data segment. These data are initialised before the program starts, in some special cases may be initalised when a function is called for the first time. What is a "filescope" variable? (1 mark) A filescope variable is a variable which, once declared, any function defined later in the same file can access the variable.Global variables: What are their disadvantages? How should you organize their use if you really must have them? In what way can C++ constructs assist in the management of globals? (2 marks) Their disadvantages are in that any function can access them and therefore change there contents. They should be declared in any implementation file, outside of a function. The use of the c++ keyword extern in the declarations in the header file for the global variables ...

< Prev Page 2 of 22 Next >

    More on Exam tests...

    Loading...
 
Copyright © 1999 - 2025 CollegeTermPapers.com. All Rights Reserved. DMCA