by Dinesh Thakur Category: Function and Pointer

The assignment operator (=) may be used on pointers of the same type. However, if the types of pointers (types of variables to which they point) are not same then we will have to do type casting of one of these to the type of the other to use assignment operator. However, the void pointer (void * ) can represent any pointer type. Thus, any type of pointer may be assigned to a void pointer. However, the reverse is not valid. A void pointer cannot be assigned to any other type of pointer without first converting the void pointer to that type.

 
by Dinesh Thakur Category: Function and Pointer

A function may have another function as one of its parameters besides having parameters of other data types. A function is a derived type object; its type is derived from the type of data it returns. Like arrays, the name of a function also holds the address of the function.

 
by Dinesh Thakur Category: Function and Pointer

The prototype of the function is written as given below,

time_t mktime (struct tm * Timeptr) ;

 
by Dinesh Thakur Category: Function and Pointer

Given a function f(x) which is continuous in the interval [a, b] and satisfying the property hat f(a)*f(b) < 0, there exists a root of the function f(x) in the interval [a, b]. The bisection algorithm works as follows where t: and 8 are small values specified by the user.

 
by Dinesh Thakur Category: Function and Pointer

The exit function can be used to terminate program execution and return a specified value as program status to the calling program, usually the operating system. A zero value indicates success. An example of the exit function indicating unsuccessful termination of a program is shown below.



 
by Dinesh Thakur Category: Function and Pointer

The syntax of the function asctime () is written as follows:

char * asctime( const stuct tm * Tmptr);

 
by Dinesh Thakur Category: Function and Pointer

For example, consider the declarations of a three-dimensional array of size 2 x 3 x 4 given below.

 
by Dinesh Thakur Category: Function and Pointer

The atoi, atof and atol utility functions are used to perform string to numeric conversion. As indicated by the last letter in function names, these functions convert the argument string to an integer, floating and long number. Note that the argument string should contain a number of appropriate type as text, optionally preceded by whitespace. For example, the atof function can successfully convert strings such as" 1.23", "3.21El0", etc. The conversion stops when an inappropriate character is encountered in the input string. Thus, these functions will also be able to convert strings such as "-1. 23ABC", "3. 21E10ABc". If conversion is successful, these functions return the converted value, otherwise zero.

 
by Dinesh Thakur Category: Function and Pointer

We have been writing "return 0;" as the last statement of every main function we have developed so far. But since main is the first function to start, no function calls main. So, the question that arises is - "Where does the return value of main go?" The value is returned and stored by the operating system and can be used to guide further actions by the operating system using shell scripts/batch files.



 
by Dinesh Thakur Category: Function and Pointer

The syntax of the function is as follows:

size_t strftime(char* s, size_t maxsize, const char* format, const struct tm * Tmptr);

 

Page 7 of 8

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content





Popular Article