Sudhir sharma has Published 1149 Articles

What is the Address of a function in C or C++?

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 08:44:02

2K+ Views

A function is a block of code that is defined to perform a specific piece of work in a program. It is used to ease the work of the programmer by defining a commonly occurring piece of code so that it can be reused when required.The address is the memory ... Read More

Adding elements of an array until every element becomes greater than or equal to k in C++.

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 08:32:43

228 Views

Array − An array is a container of elements of the same data type, whose elements are 0 indexed.In this problem, we will use an array of integers. And check if all the elements are greater than the given number or not. Here we will check if all elements of ... Read More

Add two numbers represented by two arrays in C Program

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 08:18:23

2K+ Views

A number represented by the array is stored in such a form that each digit of the number is represented by an element of the array. For example, Number 234 in array is {2, 3, 4}.To add to such numbers we will first add number at the least significant digit ... Read More

C/C++ Tricky Programs

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 08:11:14

5K+ Views

Here are 10 tricky programs that will test your programming basics.1. Program to print “ ” in C++In C++ programming language, we use quotes to denote the start and end of the text is to be printed. So, printing quotes “ needs a special escape sequence. So, we will use ... Read More

C/C++ Program for Greedy Algorithm to find Minimum number of Coins

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 08:02:59

6K+ Views

A greedy algorithm is an algorithm used to find an optimal solution for the given problem. greedy algorithm works by finding locally optimal solutions ( optimal solution for a part of the problem) of each part so show the Global optimal solution could be found.In this problem, we will use ... Read More

C++ vs C#

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 07:57:35

323 Views

C++ Programming languageA successor of the c programming language that has introduced the concept of classes and objects. It encapsulates features of c and high-level language hence it can be treated as an intermediate-level language. When it was created it was thought of as a C that has classes because ... Read More

C++ program to print unique words in a file

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 07:39:36

536 Views

A file is a memory location that stores word streams. In a file, there are various words. In this program, we will find all unique words from the file and print them.A unique word means the number of occurrences of the word is one in the file.For example, Tutorials point ... Read More

C++ Program to print current Day, Date and Time

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 07:35:01

2K+ Views

Current day, date and time are all calendar dates that are printed on screen. In c++, the ctime library contains all the methods and variables related to date and time.You can also check current date and time details using the ctime library which contains methods to display time. The following ... Read More

C++ program to find the type of the given iterator

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 07:30:27

219 Views

An iterator is an object just like a pointer that is used to iterate over elements of a container. The main advantage of using an iterator is to create a common interface and make the algorithm immune from the type of container used to implement it.In C++ standard library there ... Read More

C++ program for Sorting Dates using Selection Sort

sudhir sharma

sudhir sharma

Updated on 19-Sep-2019 07:27:31

974 Views

Date is number day, month and year. There are various ways to display a date.Here, we have a program to sort dates using selection sort. So let's learn about things that are used in this concept.Sorting datesThe concept of sorting dates needs a clear and well-versed knowledge of dates and ... Read More

Advertisements