C Subjective Question

Please download to get full document.

View again

of 19
6 views
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Download

Document Related
Document Description
COMPUTER APPLICATION BASIC QUESTIONS 1 What is C language? C is a middle level programming programming Applications. 2 What is an argument? Differentiate between formal arguments and actual arguments? Using argument we can pass the data from calling function to the called function. Arguments available in the function definition are called formal arguments. Can be preceded by their own data types. We use Actual arguments in the function call. 3 What is the purpose of main ( ) function? Main funct
Document Share
Document Tags
Document Transcript
  COMPUTER APPLICATION BASIC QUESTIONS 1 What is C language? C is a middle level programming language. C is a Structured, proceduralprogramming language. It is widely used both for operating systems andApplications. 2 What is an argument? Differentiate between formal arguments and actualarguments? Using argument we can pass the data from calling function to the called function.Arguments available in the function definition are called formal arguments. Can bepreceded by their own data types.We use Actual arguments in the function call. 3 What is the purpose of main ( ) function? Main function is to be called when the program is getting started.1. It is the first started function.2. Returns integer value.3. Recursive call is allowed for main () also.4. It is user-defined function5. It has two arguments:5.1) argument count5.2) argument vector (strings passed)6. We can use any user defined name as parameters for main (), behalf of argc andargv. 4 What is a pointer variable? A pointer variable is used to contain the address of another variable in the memory. 5 What is static memory allocation and dynamic memory allocation? Information regarding static memory allocation and dynamic memory allocation aregiven below:Static memory allocation:The compiler allocates the required memory space for a declared variable. Using theaddress of operator, the reserved address is obtained and assigned to a pointervariable. Most of the declared variables have static memory; this way is called asstatic memory allocation. In the memory is assign during compile time.  Dynamic memory allocation:For getting memory dynamically It uses functions such as malloc ( ) or calloc ( ).thevalues returned by these functions are assigned to pointer variables, this way iscalled as dynamic memory allocation. In this memory is assigned during run time. 6 What is difference between static and global static variable? Main difference between static and global static variables is given below:In context of memory it allocated to static variables only once.Static global variable has scope only in the file in which they are declared. outsidethe file it can not be accessed. but its value remains intact if code is running in someother file 7 What is a function and built-in function? function is that when large program is divided into sub programs. where as each onedone one or more actions to be performed for a large program. Those subprogramsare called functions. they support only static and extern storage classes.Built-in functions (Library function) that which are predefined and supplied with thecompiler called as built-in functions. 8 Difference between arrays and pointers? Arrays automatically allocate space with fixed in size and location, but in pointersabove are dynamic.array is referred directly to the elements.but a pointer refers to address of the elements. 9 what are storage variable? A storage class changes the behavior of a variable. It use to controls the lifetime,scope and linkage.There are five types of storage classes:1. auto2. static3. extern4. register5. typedef   10 what are header files? Can we run program without using header file? Basically header files are the library functions. Header files have definitions of functions. These are required to execute the specific operation of function. we writeheader file with .h extension. Generally these are pre-defined fuctions, But we canalso generate our own header file.Example:stdio.h header file is use to perform function like prinf and scanf.conio.h header file is use to perform function like clrscr and getch.  11 What is macro? Macros are the fragment of code. That is used to given a name. When we want toused threw name it is being replaced by content of macros. we can differentiatemacros in terms of what they look like & when they are used. Macros are of twotypes:1. Object-like macros.2. Function-like macros.When we used Object-like macros It resembles data objects. Where as when weusing function-like macros it resembles function calls 12What are the three OOPS principles and define them? Encapsulation, Inheritance and Polymorphism are the three OOPsPrinciples. Encapsulation: Is the Mechanism that binds together code and the data it manipulates, and keepsboth safe from outside interference and misuse. Inheritance: Is the process by which one object acquires the properties of another object. Polymorphism: Is a feature that allows one interface to be used for a general class of actions. 13 What is the use of bin and lib in JDK? Bin contains all tools such as javac, applet viewer, awt tool etc., whereas Libcontains all packages and variables.  14 What are the kinds of variables in Java? What are their uses? Java has three kinds of variables namely, the instance variable, the local variableand the class variable. Local variables are used inside blocks as counters or inmethods as temporary variables and are used to store information needed by asingle method.Instance variables are used to define attributes or the state of a particular object andare used to store information needed by multiple methods in the objects.Class variables are global to a class and to all the instances of the class and areuseful for communicating between different objects of all the same class or keepingtrack of global states. 15 What is the difference between while statement and a do statement? A while statement checks at the beginning of a loop to see whether the next loopiteration should occur. A do statement checks at the end of a loop to see whether thenext iteration of a loop should occur. The do statement will always execute the bodyof a loop at least once. 16 Which method is used to determine the class of an object? get Class ( ) method can be used to find out what class the belongs to. This class isdefined in the object class and is available to all objects. 17 Which keyword is used to create an instance of a class? new. 18 Which method is used to garbage collect an object? finalize (). 19 What are packages? what is use of packages? The package statement defines a name space in which classes are stored. If youomit the package, the classes are put into the default package.Signature... package pkg;Use: * It specifies to which package the classes defined in a file belongs to. *Package is both naming and a visibility control mechanism
Search Related
Previous Slide

Unw Ciwi Cover

We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks