Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Write a C program using time.h library function
The time.h library in C provides various functions to work with date and time. This library allows you to get the current system time, format it, and perform time-related calculations. Syntax #include time_t time(time_t *timer); char *strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr); struct tm *localtime(const time_t *timer); Key Functions time() − Returns the current time as seconds since January 1, 1970 (Unix timestamp) strftime() − Formats time into a string according to specified format specifiers localtime() − Converts time_t to local time structure (struct tm) ...
Read MoreWrite a C program to check the atexit() function
The atexit() is a function that allows the user to register a function that has to be called when the program terminates normally. These registered functions are called in the reverse order of their registration. It is a predefined function that is included in the stdlib.h header file. Syntax int atexit(void (*function)(void)); Parameters: function − Pointer to a function that takes no parameters and returns no value. Return Value: Returns 0 on success, non-zero on failure. Example 1: Basic Usage This example demonstrates how atexit() calls registered functions in ...
Read MoreSwitching in Mutual Funds
Switching in mutual funds refers to transferring your investment from one mutual fund scheme to another within the same fund family or Asset Management Company (AMC). This facility allows investors to reallocate their investments without exiting the fund house entirely, providing flexibility to adapt to changing market conditions or investment objectives. Key Concepts Fund families are groups of mutual funds managed by the same investment company or AMC. When you switch between funds within the same family, you're essentially selling units of one scheme and purchasing units of another scheme. This process is treated as a redemption followed ...
Read MoreRelative Length Units in CSS
Relative length units in CSS are used to specify a length relative to another length property. These units provide flexibility and responsiveness in web design by scaling based on context rather than fixed values. Syntax selector { property: value + unit; } Types of Relative Length Units Unit Description em Relative to the font-size of the element (4em = 4 times current font size) ex Relative to the x-height of the current font ch Relative to width of the "0" character ...
Read MoreCalculate interest amount by using formula in C language
In C programming, calculating interest on deposited amounts is a common financial calculation. This program demonstrates how to compute the final amount after applying continuous compound interest over a specified period. Syntax A = P * exp((r/100) * t) Where: P = Principal amount (initial deposit) r = Annual interest rate (percentage) t = Time period in years A = Final amount after interest Algorithm START Step 1: Declare double variables P, r, t, A, M Step 2: Read principal amount to be deposited Step 3: Read annual interest rate ...
Read MoreExplain the functions fread() and fwrite() used in files in C
In C programming, fread() and fwrite() functions are used for binary file operations to read and write entire structures or data blocks at once. These functions are particularly useful when working with structured data like records. Syntax size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); Parameters ptr − Pointer to the memory location to read/write data size − Size of each element in bytes nmemb − Number of elements to read/write stream − File pointer Return Value Both functions ...
Read MoreRed Herring Prospectus
A Red Herring Prospectus (RHP) is a preliminary document filed by companies planning to go public through an Initial Public Offering (IPO). It contains detailed information about the company's business, financial performance, and operations, but excludes final pricing and share allocation details. The document gets its name from the red disclaimer on its cover stating that information is subject to change. Key Components of Red Herring Prospectus A red herring prospectus typically contains the following essential information: Company details − Information about the company's history, management structure, and ownership details Industry overview − Detailed analysis of the ...
Read MoreSetting Column Rules in CSS3
The CSS column-rule property is used to create visual separators between columns in a multi-column layout. It allows you to set the width, style, and color of the rule that appears between columns. Syntax /* Shorthand property */ column-rule: width style color; /* Individual properties */ column-rule-width: value; column-rule-style: value; column-rule-color: value; Possible Values PropertyValuesDescription column-rule-widththin | medium | thick | lengthSets the width of the column rule column-rule-stylenone | solid | dotted | dashed | doubleSets the style of the column rule column-rule-colorcolor valuesSets the color of the column rule ...
Read MoreConcatenating n characters from source string to destination string in C
In C programming, the strncat() function is used to concatenate a specified number of characters from a source string to the end of a destination string. This function provides more control than strcat() by allowing you to limit the number of characters to be concatenated. Syntax char *strncat(char *dest, const char *src, size_t n); Parameters dest − Pointer to the destination string src − Pointer to the source string n − Maximum number of characters to concatenate Example 1: Basic strncat() Usage This example demonstrates concatenating only 4 characters from ...
Read MoreStatic Positioning in CSS
With static positioning, the elements are not affected by the top, bottom, left, and right properties. Static positioning is the default positioning value for all HTML elements. For this, use position: static. Syntax selector { position: static; } Key Characteristics Elements with static positioning follow the normal document flow and ignore positioning properties like top, left, right, and bottom. They appear exactly where they would naturally be placed in the HTML structure. Example Let us see an example demonstrating static positioning − ...
Read More