Sei sulla pagina 1di 2

fmod(x,y) - Calculates x modulo y, the remainder of x/y. This function is the same as the modulus operator.

But fmod() performs floating point divisions. The modulus (%) operator can only be used on integer types. We have to use fmod( ) function in math.h for float values. External Linkage-> means global, non-static variables and functions. Internal Linkage-> means static variables and functions with file scope. None Linkage-> means Local variables. Round off functions ceil(1.66) ) - 2 floor(1.44) - 1 By default a real number is treated as a double. extern int a; indicates that the variable a is defined elsewhere, usually in a s eparate source code module. If the definition of the external variable occurs in the source file before its use in a particular function, then there is no need for an extern declaration in the function. When an automatic structure is partially initialized remaining elements are init ialized to 0(zero). When an automatic array is partially initialized, the remaining elements are ini tialized to 0. In case of a conflict between a local variable and global variable, the local va riable gets priority.0 typedef enum error { warning, test, exception } err; ??? 6.68 is double. 6.68L is long double constant. 6.68f is float constant. 6.68LF is not allowed in c. typedef ??? typedef long a; extern int a c; while compiling this statement becomes extern int long c;. This will result in to "Declaration syntax error". typedef long a; extern a int c; while compiling this statement becomes extern long int c;. This will result in to "Too many types in declaration error". typedef long a; extern a c; while compiling this statement becomes extern long c;. This is a val id c declaration statement. It says variable c is long data type and defined in some other file or module. we can find the size of short integer and long integer using the sizeof() operat or. Depending on the operating system/compiler/system architecture you are working o n, the range of data types can vary.

In all the global variable declarations, you need to use the keyword extern. Float cannot be checked in a switch-case statement?

<input type="checkbox" name="chkOne" value="${param.chkOne}" /> int (*ptr)[10]; means ptr is a pointer to an array of 10 integers The sizeof function returns the size of the given expression. sizeof(3.0f) is a floating point constant. The size of float is 4 bytes sizeof('3') It converts '3' in to ASCII value.. The size of int is 2 bytes sizeof(3.0) is a double constant. The size of double is 8 bytes

A structure can contain similar or dissimilar elements A pointer union CAN be created The scanf function returns the number of input is given. Even if integer/float arguments are supplied at command prompt they are treated as strings. strrchr() returns a pointer to the last occurrence of character in a string. Data written into a file using fwrite() cannot be read back using fscanf()

Potrebbero piacerti anche