Ankith Reddy has Published 1132 Articles

How to check if a C/C++ string is an int?

Ankith Reddy

Ankith Reddy

Updated on 31-Oct-2023 03:32:51

22K+ Views

There are several methods to check that string is an int or not and one of those method is to use isdigit() to check the string.Here is an example to check whether a string is an int or not in C++ language, Example Live Demo#include #include using namespace std; int ... Read More

Substring in C++

Ankith Reddy

Ankith Reddy

Updated on 07-Oct-2023 01:44:35

23K+ Views

A substring is a part of a string. A function to obtain a substring in C++ is substr(). This function contains two parameters: pos and len. The pos parameter specifies the start position of the substring and len denotes the number of characters in a substring.A program that obtains the ... Read More

SELECT where row value contains string in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 05-Oct-2023 01:06:33

27K+ Views

To select the row value containing string in MySQL, use the following syntax.SELECT *FROM yourTableName where yourColumnName like ‘%yourPattern%’;To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table PatternDemo -> ( -> Id int, -> Name varchar(100), -> ... Read More

Java program to convert the contents of a Map to list

Ankith Reddy

Ankith Reddy

Updated on 05-Oct-2023 00:47:38

24K+ Views

The Map class's object contains key and value pairs. You can convert it into two list objects one which contains key values and the one which contains map values separately. To convert a map to list − Create a Map object. Using the put() method ... Read More

Stack and the stack pointer in 8085 Microprocessor

Ankith Reddy

Ankith Reddy

Updated on 04-Oct-2023 20:45:39

24K+ Views

The stack is a LIFO (last in, first out) data structure implemented in the RAM area and is used to store addresses and data when the microprocessor branches to a subroutine. Then the return address used to get pushed on this stack. Also to swap values of two registers and ... Read More

Best way to test if a row exists in a MySQL table

Ankith Reddy

Ankith Reddy

Updated on 06-Sep-2023 21:41:54

38K+ Views

To test whether a row exists in a MySQL table or not, use exists condition. The exists condition can be used with subquery. It returns true when row exists in the table, otherwise false is returned. True is represented in the form of 1 and false is represented as 0.For ... Read More

C Program for LowerCase to UpperCase and vice-versa

Ankith Reddy

Ankith Reddy

Updated on 02-Sep-2023 13:20:59

56K+ Views

Here is the program to convert a string to uppercase in C language, Example Live Demo#include #include int main() {    char s[100];    int i;    printf("Enter a string : ");    gets(s);    for (i = 0; s[i]!='\0'; i++) {       if(s[i] >= ... Read More

Error Detection and Correction in Data link Layer

Ankith Reddy

Ankith Reddy

Updated on 02-Sep-2023 10:55:46

71K+ Views

Data-link layer uses error control techniques to ensure that frames, i.e. bit streams of data, are transmitted from the source to the destination with a certain extent of accuracy.ErrorsWhen bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. The corrupted ... Read More

C++ Program to Implement Stack using array

Ankith Reddy

Ankith Reddy

Updated on 31-Aug-2023 02:13:46

123K+ Views

A stack is an abstract data structure that contains a collection of elements. Stack implements the LIFO mechanism i.e. the element that is pushed at the end is popped out first. Some of the principle operations in the stack are −Push - This adds a data value to the top ... Read More

What would happen if there were no Moon?

Ankith Reddy

Ankith Reddy

Updated on 27-Apr-2022 05:25:47

372 Views

We cannot imagine our night sky without the bright moon. It adds the whole lot of beauty to the nights and has been the main subject for romantic poets for ages.Coming to the science, without the Moon, Earth will not have the steady tilt and scientists say that life on ... Read More

Advertisements