-
Malarvizhi M wrote a new item 2 years, 8 months ago
Armstrong number in c?
-
Malarvizhi M started the topic program to check prime number in C Programming? in the forum C Programming 2 years, 8 months ago
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,m=0,flag=0; //declaration of variables.
clrscr(); //It clears the screen.
printf(“Enter the number to check prime:”);
scanf(“%d”,&n);
m=n/2;
for(i=2;i<=m;i++)
{
if(n%i==0)
{
printf(“Number is not prime”);…[Read more] -
Malarvizhi M started the topic purpose of sprintf() function in the forum C Programming 2 years, 8 months ago
The sprintf() stands for “string print.” The sprintf() function does not print the output on the console screen. It transfers the data to the buffer. It returns the total number of characters present in the string.
Syntax
int sprintf ( char * str, const char * format, … );
-
Malarvizhi M started the topic recursion in C in the forum C Programming 2 years, 8 months ago
When a function calls itself, and this process is known as recursion. The function that calls itself is known as a recursive function.
Recursive function comes in two phases:
1)Winding phase
2)Unwinding phaseWinding phase: When the recursive function calls itself, and this phase ends when the condition is reached.
Unwinding phase: Unwinding…[Read more]
-
Malarvizhi M wrote a new item 2 years, 8 months ago
What is the use of printf()and scanf() functions
-
Malarvizhi M wrote a new item 2 years, 8 months ago
What are void pointers
-
Malarvizhi M started the topic difference between virtual functions and pure virtual functions in the forum C++ 2 years, 8 months ago
☰
A virtual function is a member function in the base class that you redefine in a derived class. It is declared using the virtual keyword.Example-
class base{
public:
virtual void fun(){}
};
A pure virtual function is a function that has no implementation and is declared by assigning 0. It has no body.Example-
class base{
public:
v…[Read more] -
Malarvizhi M started the topic destructors in C++ in the forum C++ 2 years, 8 months ago
A constructor is automatically called when an object is first created. Similarly when an object is destroyed a function called destructor automatically gets called. A destructor has the same name as the constructor (which is the same as the class name) but is preceded by a tilde.
Example:
class A{
private:
int val;
public:
A(int x){…[Read more] -
Malarvizhi M started the topic constructor in C++ in the forum C++ 2 years, 8 months ago
The constructor is a member function that is executed automatically whenever an object is created. Constructors have the same name as the class of which they are members so that compiler knows that the member function is a constructor. And no return type is used for constructors.
Example:
class A{
private:
int val;
public:
A(int x){…[Read more] -
Malarvizhi M wrote a new item 2 years, 8 months ago
What is polymorphism in c++
-
Malarvizhi M started the topic operator overloading in the forum C++ 2 years, 8 months ago
Operator Overloading is a very essential element to perform the operations on user-defined data types. By operator overloading we can modify the default meaning to the operators like +, -, *, /, <=, etc.
For example –
The following code is for adding two complex number using operator overloading-
class complex{
private:
float r, i;
public:…[Read more] -
Malarvizhi M wrote a new item 2 years, 8 months ago
operators in python
-
Malarvizhi M started the topic What is OOP in the forum Microsoft Word 2 years, 8 months ago
OOP refers to object-oriented programming. It is a programming model that focuses on creating classes and objects. Contrary to structural programming, OOP allows you to write concise codes by reusing the codes and creating the instance of the objects.
-
Malarvizhi M started the topic Ribbon in microsoft in the forum Microsoft Word 2 years, 8 months ago
The ribbon is used as a substitute for the toolbars and menu bar in the earlier versions of Microsoft Office. In the Ribbon, toolbar buttons and file menu items were grouped as per the functionality. It made these functions easily accessible on the main interface, with most primarily utilized buttons being displayed instantly.
-
Malarvizhi M started the topic Cell address in the forum Microsoft Excel 2 years, 8 months ago
The cell address of an Excel sheet refers to the address that is obtained by the combination of the Row number and the Column alphabet. Each cell of an MS Excel sheet will have a distinct cell address.
-
Malarvizhi M started the topic Addition in C Program in the forum C Programming 2 years, 8 months ago
#include <stdio.h>
int main() {int number1, number2, sum;
printf(“Enter two integers: “);
scanf(“%d %d”, &number1, &number2);
sum = number1 + number2;
printf(“%d + %d = %d”, number1, number2, sum);
return 0;
}
