Articles on Trending Technologies

Technical articles with clear explanations and examples

Write a C program to read a data from file and display

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

In C programming, reading data from a file and displaying it is a fundamental file handling operation. This involves opening a file in read mode, reading its contents character by character, and formatting the output for better readability. Syntax FILE *fopen(const char *filename, const char *mode); int getc(FILE *stream); int fclose(FILE *stream); File Opening Modes Write mode ("w"): FILE *fp; fp = fopen("sample.txt", "w"); If the file does not exist, then a new file will be created. If the file exists, then old content gets erased and current content will ...

Read More

Outward Remittance Rules and Limits

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 428 Views

Outward remittance refers to the process of sending money from India to foreign countries for various legitimate purposes such as education, medical treatment, investment, or family maintenance. These transactions are regulated by the Reserve Bank of India (RBI) under the Foreign Exchange Management Act (FEMA) to ensure compliance with India's foreign exchange policies and maintain economic stability. Key Concepts An outward remittance is any transfer of funds from India to a foreign country through authorized dealers like banks and financial institutions. The RBI regulates these transactions to monitor foreign exchange outflows and ensure they serve legitimate purposes while ...

Read More

Understanding CSS Absolute and Relative Units

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 566 Views

CSS length units are essential for styling web pages, allowing you to set dimensions for fonts, height, width, margins, padding, and more. These units are categorized into two main types: Absolute Units and Relative Units. CSS Absolute Units Absolute length units have fixed sizes that don't change based on other elements or the viewport. They are ideal when you know the exact output format and need precise control. Unit Description px Pixels (1px = 1/96th of 1 inch) pt Points (1pt = 1/72 of 1 inch) pc Picas (1pc ...

Read More

Write a C program to display the size and offset of structure members

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

In C programming, structures allow us to group different data types under a single name. When working with structures, it's important to understand how memory is allocated for each member and their positions within the structure. The sizeof() operator helps determine the size of structure members, while the offsetof() macro shows the byte offset of each member from the beginning of the structure. Syntax struct structure_name { datatype member1; datatype member2; datatype memberN; }; sizeof(variable_or_type) offsetof(struct_type, member_name) Structure Declaration A structure ...

Read More

Offset Mortgage

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 331 Views

An offset mortgage is a type of home loan that allows borrowers to link their savings and current accounts to their mortgage account. Instead of earning interest on savings, the funds are used to reduce the mortgage balance on which interest is calculated, potentially saving thousands in interest payments over the loan term. Formula The interest calculation for an offset mortgage uses the following formula: $$\mathrm{Interest\ Charged = (Outstanding\ Mortgage\ Balance - Linked\ Savings) \times Interest\ Rate}$$ Where: Outstanding Mortgage Balance − the remaining amount owed on the mortgage Linked Savings − the total amount ...

Read More

The CSS translate() Function

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 242 Views

The CSS translate() function is used to reposition an element in horizontal and vertical directions. If you want to move an element from its current position along the X-axis and Y-axis, use the translate() function with the transform property. Syntax transform: translate(x, y); Where x is the horizontal displacement and y is the vertical displacement. Both values can be in pixels, percentages, or other CSS length units. Possible Values ParameterDescription xHorizontal displacement (required). Can be positive (right) or negative (left) yVertical displacement (optional). Can be positive (down) or negative (up) ...

Read More

Legal and illegal declaration and initializations in C

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

In C programming, variable declaration and initialization must follow specific rules. Understanding legal and illegal practices helps write error-free code and avoid compilation issues. Syntax // Variable Declaration datatype variable1, variable2, ..., variableN; // Variable Initialization datatype variable = value; Variable Declaration Variables can be declared in two scopes − Global declaration: Variables declared outside any function, accessible throughout the program. Local declaration: Variables declared inside a function, accessible only within that function. #include int globalVar; /* global declaration */ int main() { ...

Read More

Styling Lists with CSS

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 282 Views

Lists are ordered as well unordered. With CSS, you can set the list item markers or an image for the markers. You can also control the position of list-item markers to customize the appearance of your lists. Syntax selector { list-style-type: value; list-style-image: url('path'); list-style-position: value; list-style: shorthand-value; } list-style-type Property The list-style-type property is used to set the type of list-item marker. Example Let us now see an example wherein we are formatting unordered lists ...

Read More

How to calculate sum of random numbers in between 0 to 100 using files in C Programming?

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

In this program, we generate random numbers between 0 and 100, calculate their sum, and store the result in a file. The sum will be different on each execution because random numbers are generated based on the current time. Syntax FILE *fptr = fopen("filename.txt", "w"); fprintf(fptr, "format_string", value); fclose(fptr); Algorithm The steps to calculate the sum of random numbers and store in a file are − Generate 100 random numbers between 1 and 100 Calculate the sum of all generated numbers Open a file in write mode Write the sum to the ...

Read More

Loan Agreement

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 503 Views

A loan agreement is a legally binding document that establishes the terms and conditions under which a lender provides money to a borrower. It serves as a contract that protects both parties by clearly outlining repayment obligations, interest rates, fees, and any collateral requirements. This essential financial document ensures transparency and legal protection in lending transactions. Key Components of a Loan Agreement A comprehensive loan agreement typically contains the following essential elements: Parties Involved − Names and contact information of the lender and borrower Loan Principal − The total amount ...

Read More
Showing 20551–20560 of 61,297 articles
Advertisements