Articles on Trending Technologies

Technical articles with clear explanations and examples

Use CSS max-width property for responsive image

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

The CSS max-width property is essential for creating responsive images that scale down automatically based on their container size. When set to 100%, it ensures images never exceed their parent element's width while maintaining their aspect ratio. Syntax img { max-width: 100%; height: auto; } How It Works The max-width: 100% property prevents images from being larger than their container, while height: auto maintains the image's proportions by automatically adjusting the height based on the width. Example: Responsive Image The following example demonstrates how ...

Read More

Finding number of alphabets, digits and special characters in strings using C language

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 915 Views

In C programming, we can analyze a string to count different types of characters - alphabets, digits, and special characters. This is useful for string validation and data processing tasks. Syntax for(i = 0; string[i] != '\0'; i++) { if((string[i] >= 'a' && string[i] = 'A' && string[i] = '0' && string[i] = 'a' && string[i] = 'A' && string[i] = '0' && string[i]

Read More

Use CSS width property for responsive image

George John
George John
Updated on 15-Mar-2026 177 Views

The CSS width property is essential for creating responsive images that automatically scale with their container. Setting the width to 100% makes an image responsive by ensuring it never exceeds its parent container's width. Syntax img { width: 100%; height: auto; } Example The following code demonstrates how to make an image responsive using the width property − .container { ...

Read More

What are character analysis function, explain with C program?

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 355 Views

Character analysis functions in C are predefined functions in the ctype.h library used for analyzing and categorizing character input. These functions help determine the type of character (alphabet, digit, space, etc.) and convert between uppercase and lowercase letters. Syntax #include int isalpha(int c); int isdigit(int c); int isupper(int c); int islower(int c); int toupper(int c); int tolower(int c); Character Analysis Functions S.No Function Description 1 isalpha() Checks if character is an alphabet (a-z, A-Z) 2 isdigit() Checks if character is a digit (0-9) ...

Read More

Building a Responsive Grid-View with CSS

Nitya Raut
Nitya Raut
Updated on 15-Mar-2026 477 Views

A responsive grid-view is a flexible layout system that adapts to different screen sizes, automatically adjusting the arrangement and sizing of elements. In CSS, you can create responsive grids using modern techniques like CSS Grid or Flexbox. Syntax /* CSS Grid Approach */ .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(min-width, 1fr)); gap: spacing; } /* Flexbox Approach */ .container { display: flex; flex-wrap: wrap; gap: spacing; } Method 1: Using ...

Read More

Working with two-dimensional array at runtime in C programming

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 2K+ Views

In C programming, working with two-dimensional arrays at runtime involves dynamically allocating memory and performing operations on the array elements. This approach allows for flexible array sizes determined during program execution. Syntax // Static array declaration int array[rows][cols]; // Dynamic allocation for 2D arrays int **array = (int**)malloc(rows * sizeof(int*)); for(int i = 0; i < rows; i++) { array[i] = (int*)malloc(cols * sizeof(int)); } Problem Write a C program to calculate sum and product of all elements in two-dimensional arrays using runtime operations. Solution Runtime ...

Read More

Usage of CSS align-content property space-between value

George John
George John
Updated on 15-Mar-2026 178 Views

The CSS align-content property with space-between value distributes flex lines evenly within the container, placing equal space between lines with no space at the start and end. Syntax selector { align-content: space-between; } Example The following example demonstrates how space-between distributes flex lines with equal spacing between them − .mycontainer { display: flex; ...

Read More

Finding even and odd numbers in a set of elements dynamically using C language

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 1K+ Views

In C programming, we can find and calculate the sum of even and odd numbers from a set of elements using dynamic memory allocation. This approach allows us to handle variable-sized datasets efficiently by allocating memory at runtime. Syntax ptr = (int *)malloc(n * sizeof(int)); if (ptr == NULL) { // Handle memory allocation failure } // Use the allocated memory free(ptr); Algorithm The logic to separate even and odd numbers is straightforward − Even numbers: Numbers divisible by 2 (remainder is 0 when divided by 2) Odd ...

Read More

Set the width of the rule between columns with CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 155 Views

The CSS column-rule-width property is used to set the width of the rule (line) between columns in a multi-column layout. This property works in conjunction with column-rule-style and column-rule-color to create visual separators between columns. Syntax selector { column-rule-width: value; } Possible Values ValueDescription thinA thin rule (typically 1px) mediumA medium rule (typically 3px) - default value thickA thick rule (typically 5px) lengthA specific width in px, em, rem, etc. Example: Setting Column Rule Width The following example demonstrates how to set different widths for column ...

Read More

Explain dynamic memory allocation in C with an example

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 13K+ Views

Dynamic memory allocation in C allows programmers to allocate and deallocate memory during program execution rather than at compile time. This provides flexibility to handle varying data sizes efficiently. Syntax void* malloc(size_t size); void* calloc(size_t num, size_t size); void* realloc(void* ptr, size_t new_size); void free(void* ptr); Dynamic Memory Allocation Functions The main functions used for dynamic memory allocation in C are − malloc() − allocates a block of memory in bytes at runtime calloc() − allocates continuous blocks of memory and initializes them to zero realloc() − used to resize previously allocated ...

Read More
Showing 20881–20890 of 61,297 articles
Advertisements