- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sudhir sharma has Published 1206 Articles
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
421 Views
In this problem, we are given two integers x and y. Our task is to create a function that will be equivalent to pow(x, y) using an iterative approach that will complete the task in time complexity of 0(Log y).Let’s take a few examples to understand the problem, Inputx = ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
491 Views
A program to reverse digits of a number will interchange the position of the digits and reverse there order.Let’s suppose be a number abcde the reverse will be edcba.Let’s take an example to understand the problem, Inputn = 786521Output125687To reverse digits of the number, we will take each digit of ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
831 Views
In this problem, we are given an unsigned integer n. Our task is to create a program that returns the number which is generated by reversing all the bits of the number.Let’s take an example to understand the problem, Inputn = 1Output2147483648Explanationbinary of 1 is 000...0001, the reverse is 100...0000.To ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
949 Views
Here, we need to write a program that is used to check if the given number is a multiple of 3 or not.A general solution is a trivial solution, adding all the digits of the number and if the sum is a multiple of three then the number is divisible ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
250 Views
In this problem, we are given two trees. Our task is to write a code to check whether the two trees are identical or not.Two trees are said to be identical if elements of the arrays have the same value and orientation.ExampleAs both of the trees have the same values ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
271 Views
In competitive programming, the most important thing is an effective code. Optimized and faster code is important and can make a difference in the ranks of the programmer.To write an effective c/c++ code in competitive programming, here are some effective tools for writing c/c++ code efficiently, First, let’s recall some ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
508 Views
atoi() function in c programming language is used to handle string to integer conversion. The function takes a string as an input and returns the value in integer type.Syntaxint atoi(const char string)Parameters Accepted − The atio() function accepted a string as an input which will be converted into integer equivalent.Return ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
634 Views
memcpy() function is an inbuilt function that is used to copy data from source location to destination location.Prototype of memcpy function −void * memcpy(void *destination_location, void *source_location, size_t size)We will character by character copy data from source to destination.Program to show the implementation of the solution, Example Live Demo#include #include void ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
295 Views
A program that can interact with the operating system irrespective of the OS on which it runs.Most of the compilers of c/c++ have the power to define macros that detect OS.Some Macros of GCC compiler are −_WIN32: macros for 32 bit and 64-bit Windows OS._WIN64: macros for 64-bit Windows OS._UNIX: ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
95 Views
In this problem, we are given a N x N matrix and some queries, each query contains the top-left and bottom-right corner of the submatrix created from this matrix. Our task is to find the XOR of all elements of the submatrix defined by the querries.Let’s take an example to ... Read More