Karthikeya Boyini has Published 2383 Articles

isgraph() C library function

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:17:52

93 Views

The function isgraph() is used to check that the passed character has a graphical representation or not. It is declared in “ctype.h” header file.Here is the syntax of isgraph() in C language, int isgraph(int char);Here is an example of isgraph() in C language, Example Live Demo#include #include int main() {   ... Read More

Display the month number with SimpleDateFormat(“M”) in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:16:50

3K+ Views

To display the month number, use the SimpleDateFormat(“M”)// displaying month number Format f = new SimpleDateFormat("M"); String strMonth = f.format(new Date()); System.out.println("Month Number = "+strMonth);Since, we have used the Format and SimpleDateFormat class above, therefore import the following packages. With that, we have also used the Date.import java.text.Format; import java.text.SimpleDateFormat; ... Read More

How will you print numbers from 1 to 100 without using loop in C?

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:15:23

3K+ Views

There are several methods to print numbers without using loops like by using recursive function, goto statement and creating a function outside main() function.Here is an example to print numbers in C language,Example Live Demo#include int number(int val) {    if(val

Implement your own sizeof operator using C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:13:26

651 Views

There is an option that we can implement our own sizeof() operator. The operator sizeof() is a unary operator and is used to calculate the size of any type of data. We can use #define directive to implement our own sizeof() operator which will work exactly same as sizeof() operator.Here ... Read More

Java Program to convert Java Float to Numeric Primitive Data Types

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:12:40

340 Views

Let us first declare a Float object.Float ob = new Float("29.35");Now, let us convert it to numeric primitive data type short using shortValue()short val1 = ob.shortValue();In the same way, we can convert it to int using intValue() method.short val1 = ob.intValue();The following is an example that converts Float to other ... Read More

What are Wild Pointers in C/C++?

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:12:20

3K+ Views

Pointers store the memory addresses. Wild pointers are different from pointers i.e. they also store the memory addresses but point the unallocated memory or data value which has been deallocated. Such pointers are known as wild pointers.A pointer behaves like a wild pointer when it is declared but not initialized. ... Read More

isalnum() function in C Language

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:11:19

8K+ Views

The function isalnum() is used to check that the character is alphanumeric or not. It returns non-zero value, if the character is alphanumeric means letter or number otherwise, returns zero. It is declared in “ctype.h” header file.Here is the syntax of isalnum() in C language, int isalnum(int character);Here, character − ... Read More

Java Program to return a Date set to noon to the closest possible millisecond of the day

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:10:26

219 Views

Use the getMinimum() method in Java to returns the minimum value for the given calendar field. We will use it to set the minute, second and millisecond.Let us first declare a calendar object.Calendar dateNoon = Calendar.getInstance();Now, we will set the hour, minute, second and millisecond to get the closest possible ... Read More

strtod() function in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:10:10

314 Views

The function strtod() is used to convert the string to a floating point number. The string is converted into double type number. It returns the converted number, if successful otherwise, zero. This is declared in “stdlib.h” header file.Here is the syntax of strtod() in C language, double strtod(const char *string, ... Read More

memmove() function in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:09:03

373 Views

The function memmove() is used to move the whole memory block from one position to another. One is source and another is destination pointed by the pointer. This is declared in “string.h” header file in C language.Here is the syntax of memmove() in C language, void *memmove(void *dest_str, const void ... Read More

Advertisements