Karthikeya Boyini has Published 2383 Articles

Ternary Operators in C/C++

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 10:57:13

2K+ Views

The operators, which require three operands to act upon, are known as ternary operators. It can be represented by “ ? : ”. It is also known as conditional operator. The operator improves the performance and reduces the line of code.Here is the syntax of ternary operator in C language, ... Read More

Pre-increment (or pre-decrement) in C

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 10:54:34

2K+ Views

Increment operators are used to increase the value by one while decrement works opposite increment. Decrement operator decreases the value by one.Here is the syntax of pre-increment operator in C language, ++variable_name;Here is the syntax of pre-decrement operator in C language, --variable_name;Let us see the difference between pre-increment and pre-decrement ... Read More

Typecasting in C

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 10:48:40

4K+ Views

Typecasting is a method in C language of converting one data type to another.There are two types of typecasting.1.Implicit Type casting − This conversion is done by the compiler. When more than one data type of variables are used in an expression, the compiler converts data types to avoid loss ... Read More

realpath_cache_size() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 09:31:33

60 Views

The realpath_cache_size() function returns realpath cache size i.e. the amount of memory.Syntaxrealpath_cache_size()ParametersNAReturnThe realpath_cache_size() function returns the amount of memory realpath cache is using.Example Live DemoOutput362

parse_ini_string() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 09:25:58

99 Views

The parse_ini_string() function parses a configuration string. The function returns the settings as an associative array on success. It returns FALSE on failure.Syntaxparse_ini_string(file_path, process_sections)Parametersfile_path − The ini file to be parsed.process_sections − If set to TRUE, you will get a multidimensional array with section names and settings included.ReturnThe parse_ini_string() function ... Read More

C++ Program to Find Transpose of a Matrix

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:21:39

12K+ Views

A matrix is a rectangular array of numbers that is arranged in the form of rows and columns. A transpose of a matrix is a new matrix in which the rows of the original are the columns now and vice versa. For example.A matrix is given below −1 2 3 ... Read More

C++ Program to Find the Number of Vowels, Consonants, Digits and White Spaces in a String

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:20:17

1K+ Views

A string is a one dimensional character array that is terminated by a null character. There can be many vowels, consonants, digits and white spaces in a string.For example.String: There are 7 colours in the rainbow Vowels: 12 Consonants: 15 Digits: 1 White spaces: 6A program to find the number ... Read More

C++ Program to Access Elements of an Array Using Pointer

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:17:53

12K+ Views

Pointers store the memory location or address of variables. In other words, pointers reference a memory location and obtaining the value stored at that memory location is known as dereferencing the pointer.A program that uses pointers to access a single element of an array is given as follows −Example Live Demo#include ... Read More

C++ program to Reverse a Sentence Using Recursion

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:14:54

1K+ Views

A string is a one dimensional character array that is terminated by a null character. The reverse of a string is the same string in opposite order. For example.Original String: Apple is red Reversed String: der si elppAA program that reverses a sentence in the form of a string using ... Read More

C++ Program to Check Armstrong Number

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:11:14

890 Views

An Armstrong Number is a number where the sum of the digits raised to the power of total number of digits is equal to the number. Some examples of Armstrong numbers are as follows.3 = 3^1 153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = ... Read More

Advertisements