Samual Sam has Published 2492 Articles

towupper() function in C/C++

Samual Sam

Samual Sam

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

167 Views

The function iswupper() is a built-in function in C/C++. It converts the wide character into upper case. 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. If the character is upper case, it ... Read More

puts() vs printf() for printing a string in C language

Samual Sam

Samual Sam

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

2K+ Views

The function puts() and printf() are declared in stdio.h header file and are used to send the text to the output stream. Both have different usages and syntax.puts()The function puts() is used to print the string on the output stream with the additional new line character ‘’. It moves the ... Read More

How to print % using printf()?

Samual Sam

Samual Sam

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

4K+ Views

Generally, printf() function is used to print the text along with the values. If you want to print % as a string or text, you will have to use ‘%%’. Neither single % will print anything nor it will show any error or warning.Here is an example to print % ... Read More

Difference between getc(), getchar(), getch() and getche()

Samual Sam

Samual Sam

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

4K+ Views

All these functions read the character from input and return an integer. The value of EOF is used for this purpose.getc()It reads a single character from the input and return an integer value. If it fails, it returns EOF.Here is the syntax of getc() in C language, int getc(FILE *stream);Here ... Read More

strcmp() in C/C++

Samual Sam

Samual Sam

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

27K+ Views

The function strcmp() is a built-in library function and it is declared in “string.h” header file. This function is used to compare the string arguments. It compares strings lexicographically which means it compares both the strings character by character. It starts comparing the very first character of strings until the ... Read More

“extern” keyword in C

Samual Sam

Samual Sam

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

18K+ 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 ... Read More

Relational and Logical Operators in C

Samual Sam

Samual Sam

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

16K+ 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 ... Read More

fseek() in C/C++

Samual Sam

Samual Sam

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

1K+ Views

fseek() in C language, is use to move file pointer to a specific position. Offset and stream are the destination of pointer, is given in the function parameters. If successful, it returns zero. If it is not successful, it returns non-zero value.Here is the syntax of fseek() in C language, ... Read More

Scope Rules in C

Samual Sam

Samual Sam

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

225 Views

In C language, scope is a region of program where identifiers or variables are directly accessible.There are two categories of scope rules in C language.Global VariablesGlobal variables are declared and defined outside any function in the program. They hold their values throughout the lifetime of program. They are accessible throughout ... Read More

Sizeof operator in C

Samual Sam

Samual Sam

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

18K+ Views

The sizeof operator is the most common operator in C. It is a compile-time unary operator and used to compute the size of its operand. It returns the size of a variable. It can be applied to any data type, float type, pointer type variables.When sizeof() is used with the ... Read More

Advertisements