C++ Programming
- Write a C++ Program to print a welcome text in a separate line.
- Write a Program in C++ to add two numbers.
- C++ program for addition of two numbers using functions.
- Add two numbers in C++ using class.
- Addition of two numbers using call by reference in C++
- C++ program to write a program to add two numbers using call by value.
- Swapping of two numbers in C++ without using third variable.
- Swap two numbers in C++ using function.
- C++ program to swap two numbers using class.
- C++ program to swap two numbers using call by value.
- C++ program to swap two numbers using pointers.
- Write a program to swap private data members of two classes using friend function.
- write a program to add data objects of two different classes using friend function.
- Threading in C++.
- C++ thread lambda
- C++ thread lambda with parameter
- C++ thread lambda pass by reference
- Singleton C++ example
What values do these literals represent? What type does each have? (a) "Who goes with F\145rgus?\012" (b) 3.14e1L (c) 1024f (d) 3.14L
(a) Who goes with Fergus? Here \145 means ‘e’ and ‘012’ is ‘\n’ which represents a new line. These all are in a string.
(b) 3.14e1L. It represents a long double. Here e1 is 10^(1), therefore the value is 31.4
(c) 1024f : It will give an error. The suffix ‘f’ is used to represent floating point numbers. Here, it is incorrect and it should be like 1024.0f
(d) 3.14 It represents a long-double value