Karthikeya Boyini has Published 2383 Articles

Arrays in C Language

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:12:39

855 Views

Array is a collection of same type of elements at contiguous memory location. The lowest address corresponds to the first element while highest corresponds to last element.Array index starts with zero(0) and ends with the size of array minus one(array size - 1). Array size must be integer greater than ... Read More

How to use enums in C/C++?

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:11:44

720 Views

Enumeration is a user defined datatype in C language. It is used to assign names to the integral constants, which makes a program easy to read and maintain. The keyword “enum” is used to declare an enumeration.Here is the syntax of enum in C language, enum enum_name{const1, const2, ....... };The ... Read More

iswlower() function in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:10:43

152 Views

The function iswlower() is a built-in function in C/C++. It checks whether the wide character is in lower case or not. It is declared in “cwctype” header file in C++ language while “ctype.h” in C language. It takes a single character which is known as wide character. It will return ... Read More

iswdigit() function in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:09:44

157 Views

The function iswdigit() is a built-in function in C/C++. It checks whether the wide character is a decimal digit or not. It is declared in “cwctype” header file in C++ language while “ctype.h” in C language. It takes a single character which is known as wide character.The characters from 0 ... Read More

What is the use of %n in printf()?

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:08:45

4K+ Views

In C language, %n is a special format specifier. It cause printf() to load the variable pointed by corresponding argument. The loading is done with a value which is equal to the number of characters printed by printf() before the occurrence of %n.Note − It does not print anything. Another ... Read More

printf(), sprintf() and fprintf() in C

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:07:56

3K+ Views

printf()The function printf() is used to print the message along with the values of variables.Here is the syntax of printf() in C language, printf(const char *str, ...);Here is an example of printf() in C language, Example Live Demo#include int main() {    int a = 24;    printf("Welcome! ");    printf("The ... Read More

strcpy() in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:06:39

4K+ Views

The function strcpy() is a standard library function. It is used to copy one string to another. In C language, it is declared in “string.h” header file while in C++ language, it is declared in cstring header file. It returns the pointer to the destination.Here is the syntax of strcpy() ... Read More

Bitwise Operators in C

karthikeya Boyini

karthikeya Boyini

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

386 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;   ... Read More

ftell() in C

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 11:00:53

10K+ Views

In C language, ftell() returns the current file position of the specified stream with respect to the starting of the file. This function is used to get the total size of file after moving the file pointer at the end of the file. It returns the current position in long ... Read More

“register” keyword in C

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 10:59:13

8K+ Views

Register variables tell the compiler to store the variable in CPU register instead of memory. Frequently used variables are kept in registers and they have faster accessibility. We can never get the addresses of these variables. “register” keyword is used to declare the register variables.Scope − They are local to ... Read More

Advertisements