Ankith Reddy

Ankith Reddy

730 Articles Published

Articles by Ankith Reddy

Page 22 of 73

Create layers using CSS

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 90 Views

To create layers using CSS, you can control the stacking order of elements using the z-index property combined with positioned elements. This allows you to stack elements on top of each other and control which element appears in front. Syntax selector { position: relative | absolute | fixed | sticky; z-index: integer; } How Z-Index Works The z-index property only works on positioned elements (elements with position other than static). Higher z-index values appear on top of lower values. Z-Index ValueStacking Order Higher numbers ...

Read More

Set outline style as ridge with CSS

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 237 Views

To set the outline style as ridge, use the outline-style property with the value ridge. The ridge outline creates a 3D raised effect that appears to protrude from the page surface, opposite to the groove style which looks carved into the page. Syntax selector { outline-style: ridge; } Example The following example demonstrates how to apply a ridge outline style to a paragraph − .ridge-outline { outline-width: 3px; ...

Read More

Set the color of the outline with CSS

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 106 Views

The outline-color property allows you to specify the color of the outline. Its value should either be a color name, a hex color, or an RGB value, as with the color and border-color properties. Syntax selector { outline-color: value; } Possible Values ValueDescription color nameSpecifies outline color using color names (red, blue, green, etc.) hex valueSpecifies outline color using hex values (#ff0000, #0000ff, etc.) RGB valueSpecifies outline color using RGB values (rgb(255, 0, 0), etc.) initialSets the property to its default value inheritInherits the property from its parent element ...

Read More

Printing Heart Pattern in C

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 10K+ Views

In this program we will see how to print heart shaped pattern in C. The heart shape pattern consists of two rounded peaks at the top and an inverted triangle forming the base. *** *** ***** ***** *********** ********* ******* ***** *** * Now if we analyze this pattern, we can find different sections. The base of the heart is an inverted triangle; ...

Read More

Precedence of postfix ++ and prefix ++ in C/C++

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 2K+ Views

In C programming, understanding operator precedence between prefix increment (++var), postfix increment (var++), and dereference operator (*) is crucial for writing correct pointer code. The precedence order is: postfix operators have highest precedence, followed by prefix operators, then dereference. Syntax ++*ptr // Equivalent to ++(*ptr) - increment value at ptr *ptr++ // Equivalent to *(ptr++) - dereference then increment pointer (*ptr)++ // Increment value at ptr (postfix) Precedence Rules Postfix ++/-- has highest precedence Prefix ++/-- and dereference * have same precedence (right-to-left associativity) When ptr is a pointer: *ptr++ means ...

Read More

C program to print digital clock with current time

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 3K+ Views

In this section we will see how to make a digital clock using C. To work with time we can use the time.h header file. This header file has some function signatures that are used to handle date and time related issues. The four important components of time.h are like below − size_t − This size_t is basically the unsigned integral type. This is the result of sizeof(). clock_t − This is used to store the processor time time_t − This is used to store calendar time struct tm − This is a structure. It helps to ...

Read More

C Program to validate an IP address

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 9K+ Views

In this program we will see how to validate an IP address using C. The IPv4 addresses are represented in dot-decimal notation. There are four decimal numbers (all are ranging from 0 to 255). These four numbers are separated by three dots. An example of a valid IP is: 192.168.4.1 Syntax int validate_ip(char *ip); Validation Steps To validate the IP address we should follow these steps − Tokenize the string (IP address) using the dot "." delimiter If the sub strings are containing ...

Read More

Declare variable as constant in C

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 21K+ Views

In C programming, variables can be declared as constants using the const keyword or the #define preprocessor directive. Constants ensure that variable values cannot be modified after initialization, providing data integrity and preventing accidental changes. Syntax const datatype variable_name = value; #define CONSTANT_NAME value Method 1: Using const Keyword Variables can be declared as constants by using the const keyword before the datatype of the variable. The constant variables can be initialized once only. The default value of uninitialized constant variables is zero. #include int main() { ...

Read More

How to debug a core in C/C++?

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 584 Views

A process dumps core when it is terminated by the operating system due to a fault in the program. The most typical reason this occurs is that the program accessed an invalid pointer value like NULL or some value out of its memory area. As part of that process, the operating system tries to write debugging information to a file to allow us to analyze what happened. Prerequisites Installation Requirements: Install GDB debugger: sudo apt-get install gdb (Ubuntu/Debian) or yum install gdb (CentOS/RHEL) Enable core dumps: ulimit -c unlimited Compile programs with debug symbols: gcc -g ...

Read More

imagecolormatch() function in PHP

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 127 Views

The imagecolormatch() function adjusts the colors of a palette image to more closely match those of a true color image. This function is useful when you need to optimize a palette-based image to better represent the original true color version. Syntax bool imagecolormatch(resource $img1, resource $img2) Parameters img1 − A true color image resource created with imagecreatetruecolor() function. img2 − A palette image resource with the same dimensions as img1. This image's palette will be modified to match img1. Return Value The function returns TRUE on success or FALSE on ...

Read More
Showing 211–220 of 730 articles
« Prev 1 20 21 22 23 24 73 Next »
Advertisements