Articles on Trending Technologies

Technical articles with clear explanations and examples

Why is the compiler not reading string after integer in C programming?

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

When reading string input after integer input in C, a common issue occurs where the string appears to be skipped. This happens because scanf() leaves a newline character in the input buffer after reading the integer. The Problem When you use scanf() to read an integer and then try to read a string using gets() or fgets(), the leftover newline character from the integer input is immediately consumed by the string function, causing it to terminate without reading actual string input. Solution Methods Method 1: Using a Temporary Character Read the leftover newline character using ...

Read More

Usage of CSS align-items property flex-end value

Vrundesha Joshi
Vrundesha Joshi
Updated on 15-Mar-2026 195 Views

The CSS align-items property with the flex-end value is used to align flex items to the end of the cross-axis, which is typically the bottom of the flex container when using the default row direction. Syntax selector { display: flex; align-items: flex-end; } Example The following example demonstrates how to align flex items to the bottom of their container using align-items: flex-end − .mycontainer { display: flex; ...

Read More

What is the common error occurred while using scanf() statement in C language?

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

The scanf() function in C is commonly used to read formatted input, but it often causes issues when reading strings after numeric values. The main problem occurs because scanf() leaves a newline character in the input buffer after reading numbers, which interferes with subsequent string input functions. Common Error When using scanf() to read numeric data followed by string input with gets() or fgets(), the string input is skipped because the leftover newline character from the previous scanf() is immediately consumed. Example: Demonstrating the Problem Here's a program that shows the common error when reading a ...

Read More

Usage of CSS align-content property center value

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

The CSS align-content property with the center value is used to center flex lines in a flex container. This property only works when the flex container has multiple lines created by flex-wrap: wrap. Syntax .container { display: flex; flex-wrap: wrap; align-content: center; } Example The following example demonstrates how to center flex lines within a flex container − .mycontainer { display: flex; ...

Read More

How to print a name multiple times without loop statement using C language?

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

In C programming, printing a name multiple times typically requires loops. However, we can achieve this without using any loop or goto statement by implementing recursive functions or using multiple printf statements. Syntax void recursiveFunction(parameters) { // Base case if (condition) return; // Process printf("text"); // Recursive call recursiveFunction(modified_parameters); } Method 1: Using ...

Read More

Role of CSS justify-content property space-around value

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 202 Views

The CSS justify-content property with the space-around value distributes flex items evenly along the main axis with equal space around each item. This creates equal spacing on both sides of each item, making the space between adjacent items twice as large as the space at the edges. Syntax .container { display: flex; justify-content: space-around; } Example You can try to run the following code to implement the space-around value − ...

Read More

How to position text to bottom right on an image with CSS

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 1K+ Views

To position text at the bottom right of an image, use CSS positioning properties. The parent container needs position: relative while the text element uses position: absolute with bottom and right properties to achieve precise placement. Syntax .container { position: relative; } .text-overlay { position: absolute; bottom: value; right: value; } Example The following example demonstrates how to position text at the bottom right corner of an image − ...

Read More

Find the ASCII value of the uppercase character 'A' using implicit conversion in C language?

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

Implicit type conversion occurs when the compiler automatically converts a smaller data type to a larger data type without explicit casting. In C, when a char is used in an arithmetic operation, it gets implicitly converted to an int, allowing us to access its ASCII value. Syntax int ascii_value = character + 0; // Implicit conversion from char to int Example 1: ASCII Value of 'A' The following example demonstrates finding the ASCII value of uppercase character 'A' using implicit conversion − #include int main() { ...

Read More

CSS flex container properties

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

The CSS flex container properties control the layout and alignment of flex items within a flex container. These properties are applied to the parent element (flex container) to define how child elements (flex items) are arranged and distributed. Syntax .flex-container { display: flex; flex-direction: row | row-reverse | column | column-reverse; flex-wrap: nowrap | wrap | wrap-reverse; flex-flow: ; justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly; align-items: ...

Read More

What are the 4 steps to convert C program to Machine code?

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

Converting a C program to machine code is a multi-stage process that transforms human-readable source code into executable machine instructions. This process involves four essential steps that work together to create a runnable program. The 4 Steps to Convert C Program to Machine Code The conversion process follows these four sequential steps − Writing and Editing − Creating the source code Preprocessing − Processing directives and preparing code Compiling − Translating to machine language Linking − Creating the final executable Source Code (.c) ...

Read More
Showing 20901–20910 of 61,297 articles
Advertisements