Tag Archives: Dec 2009

What are the precautions that must be taken care to use macros in ‘C’? 5m Dec 2009

What are the precautions that must be taken care to use macros in ‘C’?   Caution in using macros You should be very careful in using Macros. In particular the textual substitution means that arithmetic expressions are liable to be corrupted by the order of evaluation rules (precedence rules). Here is an example of a… Read More »

Explain fscanf ( ) statements with an example. 10m Dec 2009

Explain fprintf ( ) and fscanf ( )statements with an example of each. 10m Dec 2009 fscanf() Declaration int fscanf ( FILE * stream, const char * format, … ); Description Read formatted data from stream Reads data from the stream and stores them according to the parameter format into the locations pointed by the additional arguments. The additional… Read More »

What is pointer variable? How its declared? How its address is determined? How pointer can be used to pass an entire array to a function in C? 10m Dec 2009

What is pointer variable? How is a pointer variable declared? How is the address of a pointer variable determined? How pointer can be used to pass an entire array to a function in C? Explain with the help of an example. 10 An ordinary variable is a location in memory that can hold a value.… Read More »

Explain syntax of switch case statement in ‘C’ language. Also compare switch case with if else statement. 5m Dec 2009

Explain the syntax of switch case statement in ‘C’ language. Also compare the performance of switch case with if else statement. 5m Dec 2009   The Switch Statement Its objective is to check several possible constant values for an expression, something similar to what we had studied in the earlier sections, with the linking of… Read More »

What is scope of a variable ? Differentiate between Global and Local variables

What do you mean by scope of a variable ? Differentiate between Global and Local variables giving an example of each. 5m Dec 2009  Scope of a Variable Scope of a Variable means the bondaries of the variable in which it appears and can be accessible.   Global vs. Static variables: Global variables are recognized… Read More »