Found 34489 Articles for Programming

How to start object-oriented programming in C++?

Arjun Thakur
Updated on 02-Mar-2020 08:09:42

624 Views

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of attributes; and instructions to do things, in the form of methods.For example, a person is an object which has certain properties such as height, gender, age, etc. It also has certain methods such as move, talk, and so on.ObjectThis is the basic unit of object oriented programming. That is both data and function that operate on data are bundled as a unit called as object.ClassWhen you define a class, you define a blueprint for an object. This doesn't actually ... Read More

What is the use of the '&' symbol in C++?

Sravani S
Updated on 07-Nov-2023 20:29:43

28K+ Views

The & symbol is used as an operator in C++. It is used in 2 different places, one as a bitwise and operator and one as a pointer address of operator.Bitwise ANDThe bitwise AND operator (&) compares each bit of the first operand to that bit of the second operand. If both bits are 1, the bit is set to 1. Otherwise, the bit is set to 0. Both operands to the bitwise AND operator must be of integral types. Example #include   using namespace std;   int main() {      unsigned short a = 0x5555;      // pattern 0101 ...      unsigned short b = 0xAAAA;      // pattern 1010 ...      cout

What are undefined reference/unresolved external symbol errors in C++?

Daniol Thomas
Updated on 23-Jun-2020 13:26:30

1K+ Views

As the name suggests, a symbol you declared was not defined by you. This may occur due to many cases. Let's have a look at three of them −You forgot to define the declared name. For example, you declared a function in a file and used it somewhere. But you did not provide its definition. Code −#include void foo(); int main() {    foo(); // Declared but not defined }You defined it but did not use the qualified name. Say you created a class with a method and defined that method but forgot using scope resolution to link that function ... Read More

What are the best online tutorials for C++?

V Jyothi
Updated on 23-Jun-2020 13:25:11

137 Views

There are many resources on the web that can help you learn C++. I've tried to give you a compiled list of some of the best resources out there to learn C++ −http://www.tutorialspoint.com/cplusplus/ − This is a great place to learn C++ as it covers almost all basic and intermediate topics in C++ in-depth and is overall a great resource to learn C++. A Tour of C++ (Bjarne Stroustrup) − This book is a quick overview of C++ (language and standard library, and using C++11) at a high level for people who already know C++. This is a good book for ... Read More

What are the best C++ Books and Guides?

Krantik Chavan
Updated on 23-Jun-2020 13:28:34

103 Views

There are many resources on the web that can help you learn C++. I've tried to give you a compiled list of some of the best resources out there to learn C++ −http://www.tutorialspoint.com/cplusplus/ − This is a great place to learn C++ as it covers almost all basic and intermediate topics in C++ in depth and is overall a great resource to learn C++.A Tour of C++ (Bjarne Stroustrup) − This book is a quick overview of C++ (language and standard library, and using C++11) at a high level for people who already know C++. This is a good book ... Read More

C++11 Features Supported by Intel

Priya Pallavi
Updated on 30-Jul-2019 22:30:21

108 Views

The C++11 features supported by Intel are available as an official guide in their docs. You can check these features out on https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler.

How to stop form submission using JavaScript?

Abhishek
Updated on 06-Sep-2023 13:02:30

51K+ Views

In this tutorial, we will see the methods to stop form submission using JavaScript. Generally, the HTML form by default submitted automatically if we try to perform some operations by using some events. The automatic submission of the form leads the browser to refresh and reload the whole page again, which we don’t want to perform in some cases. So, to perform any operation before submission we need to change the default behavior of the form to prevent it from submission. Following are the methods we can use to stop form submission − Using the "return false" value Using ... Read More

How to Check Leap Year using Python?

Jayashree
Updated on 22-Dec-2020 07:33:54

634 Views

Leap year comes after every four years. For normal year, if it is divisible by four, it is called leap year, whereas for century year, it should be divisible by 400. The following Python program shows whether the year is leap or notExampleyr=int(input('enter year')) if yr%100==0: #century year if yr%400==0:    print ('{} is leap year'.format(yr)) else:    print ('{} is not leap year'.format(yr)) else:    if yr%4==0:       print ('{} is leap year'.format(yr)) else:    print ('{} is not leap year'.format(yr))Outputenter year2012 2012 is leap year enter year2018 2018 is not leap year 2000 is ... Read More

How to Check if a Number is Odd or Even using Python?

Vikram Chiluka
Updated on 27-Oct-2022 12:36:20

4K+ Views

In this article, we will show you how to check if a number is odd or even in python. Below are the methods to accomplish this task − Using modulo (%) operator Using Recursion Using the Binary AND (&) operator Using modulo (%) operator Python's modulo (%) operator (also called the remainder operator) is useful to determine if a number is odd or even. We obtain the remainder of the division of a number by 2. If it is 0, it is even otherwise it is odd Even Number − A number that can be divided by 2, ... Read More

How to Convert Celsius To Fahrenheit using Python?

Vikram Chiluka
Updated on 25-Oct-2022 07:28:14

15K+ Views

In this article, we will show you how to convert Celsius To Fahrenheit using Python. Celsius Celsius is a temperature measurement unit that is also known as centigrade. It is an SIderived unit that is used by the majority of countries throughout the world. It is named after the Swedish astronomer Anders Celsius. Fahrenheit Fahrenheit is a temperature scale named after the Polish-born German physicist Daniel Gabriel Fahrenheit, and it uses degrees Fahrenheit as a temperature unit. To obtain Fahrenheit equivalent of celsius, multiply by 1.8 and add 32 - f=c*1.8+32 Or we can use another formula − ... Read More

Advertisements