C/C++ program to Reverse a String

String In C language string is an Array of the Char variable. to write a program of the string reverse we have to break this program into steps as always. Take input from the user. Reverse the string using the for loop print the final answer to the user. First of All, create a schema for the program. #include <stdio.h> #include <string.h> int main(int argc, char const *argv[]) { return 0; } Now write some code for the Taking input from the user....

December 17, 2018 · 2 min · Rahul Rajput

For Each loop in JavaScript

Introduction In this blog post we will learn about the foreach loop in javascript if you are new to javascript please see this. Folks who haven’t used since long time here is the refresher. What is For Each Loop: this is the loop which automatically iterates through all the elements of an array, it helps in the working with the dynamic array. Let’s start working. In javascript for-each loop works in a different way....

December 15, 2018 · 2 min · Rahul Rajput

XML parsing in Python3 (working with ElementTree)

XML : XML stands for the eXtensible Markup Language. It was designed for data transport and data storage. It was designed for both Human and machine readable. That’s enough for the introduction. Let’s start working. First of all the XML file that we are working on. <messages> <note id="501"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>This is code in cafe</body> </note> <note id="502"> <to>Jani</to> <from>Tove</from> <heading>Re: Reminder</heading> <body>I will not</body> </note> </messages> We are using this file as an example XML file, name this file as the “example....

December 13, 2018 · 2 min · Rahul Rajput

Split a string in C/C++ and Python

Splitting a string by some delimiter is a very common task in programmers day to day life. For example, we have an email address, and we want to extract email host which is part after @ in email address, example@gmail.com. After splitting this email address by “@”, there will be two strings “example”, “gmail.com”. Use case of string splitting contains, tokenizing things in compilers, extracting relevant data with Web crawlers etc....

December 11, 2018 · 1 min · Rahul Rajput

TCP Socket Programming in Python (server/client)

Socket Programming in Python What is Socket :  A socket is one end of a two-way communication link between two programs/software running on the network. A socket is bound to a port (also known as process id) number so that the TCP/UDP layer can identify the application that data to be transferred to. What to do? in order to create a server first, we need to create a socket in the program and put this socket into the listen mode....

December 10, 2018 · 3 min · Rahul Rajput

Installing C/C++ (GCC) compiler On Windows

Installing the C/C++ (GCC) Compiler Windows TLDR; In this blog post we are going to install GCC compiler in windows platform. If you just wanted to skip all the step and do it yourself here is the link GCC TDM In this Tutorial, we are going to look into the full process of installing one of the C or C++ compiler as GCC compiler to your Windows machine....

December 10, 2018 · 2 min · Rahul Rajput

File handling in C++

In this tutorial, we are working with the files in the C++ or you have known to work with files as the file handling. File handling in any language requires Three main step to follow Open the file in Read/Write mode. Do various operation that you want to do. Close the file. So In CPP, you can also use the traditional approach of C using FILE pointer and etc....

December 9, 2018 · 2 min · Rahul Rajput