Found 27759 Articles for Server Side Programming

Bitwise Operators in C

karthikeya Boyini
Updated on 24-Jun-2020 11:01:54

377 Views

Bitwise operators are used to perform bit-level operations on two variables. Here is the table of bitwise operators in C language,OperatorsName of Operators&Bitwise AND|Bitwise OR^Bitwise XOR~Bitwise complementShift rightHere is an example of bitwise operators in C language,Example Live Demo#include int main() {    int x = 10;    int y = 28;    int i = 0;    printf("Bitwise AND : %d", x&y);    printf("Bitwise OR : %d", x|y);    printf("Bitwise XOR : %d", x^y);    printf("Bitwise Complement : %d,%d", ~x,~-y);    for(i;i>i);    for(i;i

Relational and Logical Operators in C

Samual Sam
Updated on 24-Jun-2020 11:02:49

15K+ Views

Relational OperatorsRelational operators are used to compare two values in C language. It checks the relationship between two values. If relation is true, it returns 1. However, if the relation is false, it returns 0.Here is the table of relational operators in C languageOperatorsOperator Name==Equal to>Greater than=Greater than or equal toy)    printf("x is greater than y ");    if(x

asinh() function in C++ STL

Arjun Thakur
Updated on 24-Jun-2020 11:03:19

93 Views

The asinh() function returns the arc hyperbolic sine or the inverse hyperbolic sine of an angle given in radians. It is an inbuilt function in C++ STL.The syntax of the asinh() function is given as follows.asinh(var)As can be seen from the syntax, the function asinh() accepts a parameter var of data type float, double or long double. The value of this parameter can be anything i.e negative, positive or 0. It returns the arc hyperbolic sine of var.A program that demonstrates asinh() in C++ is given as follows −Example Live Demo#include #include using namespace std; int main() {   ... Read More

acosh() function in C++ STL

Chandu yadav
Updated on 24-Jun-2020 10:53:32

87 Views

The acosh() function returns the arc hyperbolic cosine or the inverse hyperbolic cosine of an angle given in radians. It is an inbuilt function in C++ STL.The syntax of the acosh() function is given as follows.acosh(var)As can be seen from the syntax, the function acosh() accepts a parameter var of data type float, double or long double. The value of this parameter should be greater than or equal to 1. It returns the arc hyperbolic cosine of var.A program that demonstrates acosh() in C++ is given as follows.Example Live Demo#include #include using namespace std; int main() {    double ... Read More

“extern” keyword in C

Samual Sam
Updated on 24-Jun-2020 11:03:45

17K+ Views

External variables are also known as global variables. These variables are defined outside the function. These variables are available globally throughout the function execution. The value of global variables can be modified by the functions. “extern” keyword is used to declare and define the external variables.Scope − They are not bound by any function. They are everywhere in the program i.e. global.Default value − Default initialized value of global variables are Zero.Lifetime − Till the end of the execution of the program.Here are some important points about extern keyword in C language, External variables can be declared number of times ... Read More

tanh() function in C++ STL

George John
Updated on 24-Jun-2020 10:54:11

92 Views

The tanh() function returns the hyperbolic tangent of an angle given in radians. It is an inbuilt function in C++ STL.The syntax of the tanh() function is given as follows.tanh(var)As can be seen from the syntax, the function tanh() accepts a parameter var of data type float, double or long double. It returns the hyperbolic tangent of var.A program that demonstrates tanh() in C++ is given as follows.Example Live Demo#include #include using namespace std; int main() {    double d = 5, ans;    ans = tanh(d);    cout

Pre-increment (or pre-decrement) in C

karthikeya Boyini
Updated on 24-Jun-2020 10:54:34

1K+ Views

Increment operators are used to increase the value by one while decrement works opposite increment. Decrement operator decreases the value by one.Here is the syntax of pre-increment operator in C language, ++variable_name;Here is the syntax of pre-decrement operator in C language, --variable_name;Let us see the difference between pre-increment and pre-decrement operator.Pre-increment − Before assigning the value to the variable, the value is incremented by one.Here is an example of pre-increment in C language, Example Live Demo#include int main() {    int i = 5;    printf("The pre-incremented value : %d", i);    while(++i < 10 )    printf("%d\t", i);   ... Read More

atanh() function in C++ STL

Ankith Reddy
Updated on 24-Jun-2020 10:55:29

72 Views

The atanh() function returns the arc hyperbolic tangent or the inverse hyperbolic tangent of an angle given in radians. It is an inbuilt function in C++ STL.The syntax of the atanh() function is given as follows.atanh(var)As can be seen from the syntax, the function atanh() accepts a parameter var of data type float, double or long double. The value of this parameter should be between -1 and 1. It returns the arc hyperbolic tangent of var.A program that demonstrates atanh() in C++ is given as follows.Example Live Demo#include #include using namespace std; int main() {    double d = ... Read More

Storage Classes in C

Samual Sam
Updated on 24-Jun-2020 10:56:17

2K+ Views

In C language, the features of variables and functions are described by the storage classes like visibility and scope of q variable or function.There are four types of storage classes in C language: Automatic variables, External variables, Static variables, and Register variables.autoAuto storage class is the default storage class for all the local variables. It is created when function is called. When the execution of function is completed, variables are destroyed automatically.They are also known as local variables because they are local to a function. By default, they are assigned the garbage value by the compiler.Scope − auto variables are ... Read More

cosh() function in C++ STL

Arjun Thakur
Updated on 24-Jun-2020 10:56:50

106 Views

The cosh() function returns the hyperbolic cosine of an angle given in radians. It is an inbuilt function in C++ STL.The syntax of the cosh() function is given as follows.cosh(var)As can be seen from the syntax, the function cosh() accepts a parameter var of data type float, double or long double. It returns the hyperbolic cosine of var.A program that demonstrates cosh() in C++ is given as follows −Example Live Demo#include #include using namespace std; int main() {    double d = 5, ans;    ans = cosh(d);    cout

Advertisements