Karthikeya Boyini has Published 2383 Articles

strftime() function in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:36:22

589 Views

The function strftime() is used to format the time and date as a string. It is declared in “time.h” header file in C language. It returns the total number of characters copied to the string, if string fits in less than size characters otherwise, returns zero.Here is the syntax of ... Read More

exit(), abort() and assert() in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:35:45

2K+ Views

exit()The function exit() is used to terminate the calling function immediately without executing further processes. As exit() function calls, it terminates processes. It is declared in “stdlib.h” header file. It does not return anything.Here is the syntax of exit() in C language, void exit(int status_value);Here, status_value − The value which ... Read More

Display weekday names in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:34:35

383 Views

To display weekday names in Java, use the getWeekdays() method.For that, firstly import the following package.import java.text.DateFormatSymbols;Now, create a string array and get all the weekday names using the getWeekdays() method.String[] weekDays = new DateFormatSymbols().getWeekdays();Example Live Demoimport java.text.DateFormatSymbols; public class Demo {    public static void main(String[] args) {     ... Read More

pow() function in C

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:33:04

7K+ Views

The function pow() is used to calculate the power raised to the base value. It takes two arguments. It returns the power raised to the base value. It is declared in “math.h” header file.Here is the syntax of pow() in C language, double pow(double val1, double val2);Here, val1 − The ... Read More

Return type of getchar(), fgetc() and getc() in C

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:30:45

2K+ Views

Details about getchar(), fgetc() and getc() functions in C programming are given as follows −The getchar() functionThe getchar() function obtains a character from stdin. It returns the character that was read in the form of an integer or EOF if an error occurs.A program that demonstrates this is as follows ... Read More

Java Program to return a Date set to the last possible millisecond of the day before midnight

karthikeya Boyini

karthikeya Boyini

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

76 Views

Let us first set the calendar object.Calendar calendar = Calendar.getInstance();Use the getMaximum() method in Java to returns the maximum value for the given calendar field. We will use it to set the minute, hours second and milliseconds.For hour and minute.calendar.set(Calendar.HOUR_OF_DAY, calendar.getMaximum(Calendar.HOUR_OF_DAY)); calendar.set(Calendar.MINUTE, calendar.getMaximum(Calendar.MINUTE));For second and milliseconds.// second calendar.set(Calendar.SECOND, calendar.getMaximum(Calendar.SECOND)); // ... Read More

Convert from float to String in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:21:49

9K+ Views

To convert float to string, use the toString() method. It represents a value in a string.Let’s say the following is our float.float f = 0.9F;Converting the float value to string.String s = Float.toString(f);Let us see the complete example to convert float to String in Java with output.Example Live Demopublic class Demo ... Read More

Java Program to get full day name

karthikeya Boyini

karthikeya Boyini

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

4K+ Views

To display the full day name, use the SimpleDateFormat(“EEEE”) as shown below −// displaying full-day name f = new SimpleDateFormat("EEEE"); String str = f.format(new Date()); System.out.println("Full Day Name = "+str);Since, we have used the Format and SimpleDateFormat class above, therefore import the following packages. With that, we have also used ... Read More

Bounce Out Down Animation Effect with CSS

karthikeya Boyini

karthikeya Boyini

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

119 Views

To implement Bounce Out Down Animation Effect with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;     ... Read More

mbrlen() function in C/C++

karthikeya Boyini

karthikeya Boyini

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

134 Views

The function mbrlen() is used to get the length of multibyte character. It returns the size of multibyte character pointed by the pointer.Here is the syntax of mbrlen() in C language, size_t mbrlen(const char* pointer, size_t size, mbstate_t* state);Here, pointer − Pointer to the first byte of multibyte character.size − ... Read More

Advertisements