Samual Sam has Published 2310 Articles

islessequal() in C/C++

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:52:25

261 Views

The function islessequalr() is used to check that first argument is less than or equal to the second. It is declared in “math.h” header file. It returns true, if successful otherwise false.Here is the syntax of islessequal()bool islessequal(value1 , value2);Here, value1 − This is the first argument which will be ... Read More

size_t data type in C

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:47:14

9K+ Views

The datatype size_t is unsigned integral type. It represents the size of any object in bytes and returned by sizeof operator. It is used for array indexing and counting. It can never be negative. The return type of strcspn, strlen functions is size_t.Here is the syntax of size_t in C ... Read More

fgets() and gets() in C

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:46:12

2K+ Views

fgets()The function fgets() is used to read the string till the new line character. It checks array bound and it is safe too.Here is the syntax of fgets() in C language, char *fgets(char *string, int value, FILE *stream)Here, string − This is a pointer to the array of char.value − ... Read More

Isprint() in C++

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:42:01

92 Views

The function isprint() is predefined function and it checks that the passed characters are printable or not. It returns non-zero value, if successful otherwise, zero. This function is declared in “cctype” header file.Here is the syntax of isprint() in C++ language, int isprint(int character);Here, character − The character is to ... Read More

When to use i++ or ++i in C++?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:36:30

1K+ Views

Increment operators are used to increase the value by one while decrement works opposite. Decrement operator decrease the value by one.Pre-increment (++i) − Before assigning the value to a variable, the value is incremented by one.Post-increment (i++) − After assigning the value to a variable, the value is incremented.Here is ... Read More

modf() in C/C++

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:35:27

413 Views

The function modf() is used to split the passed argument in integer and fraction. It is declared in “math.h” header file for the mathematical calculations. It returns the fractional value of passed argument.Here is the syntax of modf() in C language, double modf(double value, double *integral_pointer);Here, value − The value ... Read More

Java Program to check whether the character is ASCII 7 bit

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:11:17

418 Views

To check whether the character is ASCII 7 bit or not, check whether given value’s ASCII value is less than 128 or not.Here, we have a character.char one = '-';Now, we have checked a condition with if-else for ASCII 7-bit character.if (c < 128) { System.out.println("Given value is ASCII 7 ... Read More

Stack in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:05:40

2K+ Views

A stack class is provided by the Java collection framework and it implements the Stack data structure. The stack implements LIFO i.e. Last In First Out. This means that the elements pushed last are the ones that are popped first.The following are some of the methods.Sr.NoMethods & Description1boolean empty()Tests if ... Read More

Keywords in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:04:17

1K+ Views

Keywords in Java are reserved words that represent predefined actions, internal processes etc. Because of this, keywords cannot be used as names of variables, functions, objects etc.The main difference between keywords and identifiers is that keywords are reserved words that represent predefined actions while identifiers are the names of variables, ... Read More

Different Methods to find Prime Number in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 07:03:02

2K+ Views

A prime number is a number that is only divisible by one or itself. Some of the prime numbers are 2, 3, 5, 7, 11, 13 etc.Some of the different methods to find a prime number in Java are given as follows −Method 1 - Find if a number is ... Read More

Advertisements