Sunday, 3 December 2023

Off-page SEO

 Off-page SEO

Off-page SEO refers to SEO tactics applied outside of a website to improve its rankings. These tactics often include link building, guest posting, social media marketing, and more. 

off page seo
Off Page SEO

The goal of off-page SEO is to get search engines (and users) to see your site as more trustworthy and authoritative. 

What Is Off-Page SEO?

Off-page SEO includes activities done off of a website in an effort to increase the site’s search engine rankings. Common off-page SEO actions include building backlinks, encouraging branded searches, and increasing engagement and shares on social media.


In other words: off-page SEO is all the stuff that you do off of your site to get Google and other search engines to see your website as trustworthy and authoritative.


Off-Page SEO Techniques That Really Work

Let's take a look at five different off-page tactics you can use to boost your site's authority and organic search traffic:

  1. Link Building
  2. Content Marketing
  3. Local SEO (GMB and Citations)
  4. Reviews
  5. Events

Monday, 25 September 2023

Google Forms Complete Tutorial

 Google Forms Complete Tutorial

How to use Google Forms

Step 1: Set up a new form or quiz. Go to forms.google.com. ...

Step 2: Edit and format a form or quiz. You can add, edit, or format text, images, or videos in a form. ...

Step 3: Send your form for people to fill out. When you are ready, you can send your form to others and collect their responses.



Google Forms Complete Tutorial

Google Forms is a web-based tool provided by Google for creating surveys, quizzes, and forms. It's a versatile tool that can be used for a wide range of purposes, from collecting feedback to conducting online assessments. Here's a step-by-step guide on how to use Google Forms:


Access Google Forms:


Go to Google Forms in your web browser.

Sign in: If you're not already signed in to your Google account, you'll need to do so. If you don't have an account, you can create one for free.


Create a New Form:


Click on the "+ Blank" button to create a new form from scratch.

Add Questions:


Click on "Untitled form" to give your form a title.

Click on the "Untitled question" field to add your first question.

Choose the question type (e.g., multiple-choice, short answer, paragraph, etc.) from the dropdown menu.

Enter your question text and any applicable answer choices or options.

To add more questions, click the "+" button below the question or click on the "Add question" button in the toolbar on the right.

Edit Question Settings:


To customize each question, click on the question itself and then click the "Settings" (gear) icon.

Here, you can configure options such as making the question required, adding data validation, and randomizing answer choices (for multiple-choice questions).

Organize Sections (Optional):


You can create sections within your form to group related questions together. This is useful for longer surveys or quizzes.

To create a section, click the "Add section" button in the toolbar on the right.

Add Descriptions and Images (Optional):


You can add descriptions or instructions to your form by clicking the "Description" button in the toolbar or by clicking on the "Section" title.

To add images or videos to your questions or sections, click the "Insert image" or "Insert video" icons in the toolbar.

Customize the Theme (Optional):


Click the "Color palette" icon in the upper-right corner to customize the theme, background color, or header image of your form.

Preview Your Form:

Click the "Eye" icon in the upper-right corner to preview how your form will appear to respondents.

Share Your Form:

Click the "Send" button in the upper-right corner to share your form.

You can share it via email, by generating a link, or by embedding it on a website.

You can also set up notifications to receive email alerts when someone submits a response.

Collect Responses:

Respondents can fill out your form by following the link you provided.

Responses are automatically collected and stored in a Google Sheets spreadsheet, which you can access by clicking the "Responses" tab in the form editor.

View and Analyze Responses:

In the "Responses" tab, you can view individual responses and use Google Sheets' built-in features to analyze and visualize the data.

Close the Form (Optional):

If you want to stop accepting responses, click the "Responses" tab and toggle off "Accepting responses."

Download or Export Responses (Optional):

You can download responses as a CSV or Excel file by clicking the Sheets icon in the "Responses" tab.

Edit, Duplicate, or Delete the Form (Optional):

To make changes to your form after it's been created, click the form title and then use the editing options available.

You can also duplicate or delete the form using the three-dot menu in the upper-right corner.


Gmail Tips and Tricks 2023

 Gmail Tips and Tricks 2023

IN this Tutorial we discuss about Gmail Tips and Tricks 2023

Below are gmail tips and tricks in hindi


Gmail Tips and Tricks

1. Visualize your email activity (and your team’s).

2. Un-send an email.

3. Send emails that self-destruct after a certain amount of time.

4. Send an email that requires recipients to go through 2-step verification to read.

5. Disable email snippet previews.

6. Use one Gmail inbox to sign up for the same service multiple times.

7. Pause your inbox.

8. Remove the “Social” and “Promotions” tabs

9. Quote a previous email in your response.

10. Grant someone else access to your Gmail account without revealing your Gmail password.

11. Ungroup threaded email “conversations” into individual emails.

12. Organize your emails with labels.

13. Get colorful with stars.

14. Use Gmail automatic filtering to keep your inbox cleaner.

15. Use Gmail even with a slow internet connection.

16. Insert photos so they display inside your email.

17. Use stars for another organization option.

18. Automatically unsubscribe from unwanted email newsletters.

19. Use Gmail search operators to refine your search.

20. Automatically append an email signature to every email you send.

21. Get desktop notifications whenever you get a new email.

22. Train Google how to properly mark emails.

23. Get reminded when someone doesn’t reply to your email.

24. View more (or less) emails at a time in your inbox.

25. Mark emails as unread even if you’ve read them.

26. Mute conversations.

27. Get an alert whenever someone opens an email you sent to them.

28. Get faster by using keyboard shortcuts.

29. Automatically categorize emails as they come in.

30. Add bullet points, numbered lists, and other formatting to your emails.

31. Use Gmail even if you’re offline.

32. Open multiple Gmail accounts – as separate tabs – in the same browser window.

33. Prioritize certain emails to always appear at the top of your inbox.

Advanced Gmail Tips and Tricks

34. Move chat from the left to the right side.

35. Create your own Gmail keyboard shortcuts.

36. Automatically open your next email.

37. Manage multiple inboxes.

38. Create email template responses that you can add with a single click.

39. Preview emails without opening them.

40. Enable two-factor authentication.


Tuesday, 28 July 2020

Count Number of Digits of an Integer in C++

                Count Number of Digits of an Integer in C++


This code is simple to write Count Number of Digits of an Integer in C++




#include <iostream>
using namespace std;
int main() {
    int num, temp;
    int count = 0;
    cout << "Enter any number : ";
    cin >> num;
    temp = num;   
    while(temp != 0) {
        count++;
        temp /= 10;
    }
    cout << endl << "Number of digits in " << num << " : "  << count;
    return 0;
}



Output



Enter any number : 34657

Number of digits in 34657: 5

Monday, 20 July 2020

Reverse Number Program in C++

 Reverse Number Program in C++

This code is very simple and easy to write Reverse Number Program in C++



#include<iostream>
using namespace std;
int main()
{
int n,t,r,rev=0;
cout<<"Enter any number:";
cin>>n;
t=n;
while(t>0)
{
r=t%10;
t=t/10;
rev=rev*10+r;
}
cout<<"Reverse of number"<<n<<"is"<<rev;
return 0;
}


Output


Enter any number:3425
Reverse of number 3425 is 5243

Sunday, 19 July 2020

Table of Any Number Program in C++

Table of any Number Program in C++ 

This code is very simple and easy to write Table of any number program in C++



#include <iostream>
using namespace std;
int main() {
    int n, term, i;     
    cout << "Enter a number to print table\n";
    cin >> n;
    cout << "Enter the number of terms in table\n";
    cin >> term;
    for(i = 1; i <= term; ++i){
        cout << n << " X " << i << " = " << n*i << endl;
    }      
    return 0;
}



  Output



Enter a number to print table
5
Enter the number of terms in table
10
5 X 1 = 5
5 X 2 = 10
5 X 3 = 15
5 X 4 = 20
5 X 5 = 25
5 X 6 = 30
5 X 7 = 35
5 X 8 = 40
5 X 9 = 45
5 X 10 = 50



Thursday, 16 July 2020

Factorial Program in C

Factorial Program in C 

This code is very simple and easy to write Factorial Program in C

factorial program in c

#include<stdio.h>
#include<conio.h>
void main()
{
    int n,i,f;
    f=i=1;
    clrscr();
    printf("Enter a Number to Find Factorial: ");
    scanf("%d",&n);
    while(i<=n)
    {
        f*=i;
        i++;
    }
    printf("The Factorial of %d is : %d",n,f);
    getch();
}


Output


Enter a Number to Find Factorial: 5
The Factorial of 5 is : 120

Monday, 13 July 2020

Best CCTV Camera

Best CCTV Camera


Closed-circuit television (CCTV), additionally referred to as video surveillance, is the use of video cameras to transmit a sign to a selected location, on a confined set of monitors. It differs from broadcast television in that the sign isn't always overtly transmitted, although it could rent factor to factor (P2P), point to multipoint (P2MP), or mesh stressed out or wi-fi hyperlinks. Here you get best cctv camera.

Though nearly all video cameras match this definition, the time period is most customarily implemented to those used for surveillance in areas that may need monitoring including banks, shops, and different regions where safety is wanted. Though Videotelephony is seldom called 'CCTV' one exception is the use of video in distance schooling, wherein it's miles an essential device.

Surveillance of the general public the use of CCTV is not unusual in lots of areas round the world. In recent years, the usage of frame worn video cameras has been introduced as a brand new shape of surveillance, often used in law enforcement, with cameras located on a police officer's chest or head.

Video surveillance has generated massive debate approximately balancing its use with individuals' proper to privacy even if in public.

In industrial plant life, CCTV system may be used to have a look at components of a system from a primary manipulate room, as an instance while the surroundings is not suitable for human beings. CCTV structures might also function constantly or only as required to screen a particular occasion.

A greater superior shape of CCTV, utilising digital video recorders (DVRs), offers recording for possibly a few years, with a ramification of fine and performance options and additional features (along with movement detection and email indicators). More recently, decentralized IP cameras, perhaps geared up with megapixel sensors, aid recording without delay to network-attached garage devices, or inner flash for absolutely stand-alone operation.






















Search terms:
Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur,Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur ,Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur,Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur,Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur,Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur, Buy Buy, Buy And Sell, Buy Here Pay Here, Buy Windows 10, Buy A Gift, CCTV, CCTV Desk, CCTV Hardware, CCTV Software, CCTV Programming, CCTV Virus, CCTV Games, Kanpur, CCTV Kanpur, Kanpur Cheap CCTV, Cheap CCTV Kanpur

Sunday, 10 May 2020

Difference Between HTML and HTML5

Difference Between HTML and HTML5

What is HTML5?

Difference between HTML5 and HTML : HTML5 is a software solution stack that defines the properties and behaviors of web page content by implementing a markup-based pattern to it. HTML5 was the fifth and current major version of HTML that is a World Wide Web Consortium recommendation.

What is HTML?

Difference between HTML5 and HTML : HTML stands for Hypertext Markup Language. It allows the user to create and structure sections, paragraphs, headings, links, and blockquotes for web pages and applications. … For example, we can create a paragraph by placing the enclosed text within a starting <p> and closing </p> tag.

Difference Between HTML and HTML5


I Hope you understand difference between html and html5.

Saturday, 4 January 2020

Applications of C

Applications of C

 C Programming is a best-known programming language. C Programming is near to machine as well as human so it is called as Middle-level Programming Language. C Programming can be used to do a verity of tasks such as networking related, OS related. Here we Discuss About Complete Applications of C

C language is used for creating computer applications. It is used in writing Embedded software, Firmware for various electronics, industrial and communications products which use micro-controllers. It is also used in developing verification software, test code, simulators etc. for various applications and hardware products. For Creating Compiles of different Languages which can take input from other language and convert it into a lower level machine dependent language. C is used to implement different Operating System Operations. UNIX kernel is completely developed in C Language.

C was initially used for system development work, in particular, the programs that make-up the operating system. Why use C? Mainly because it produces code that runs nearly as fast as code written in assembly language. Some examples of the use of C might be:


  1. Operating Systems
  2. Language Compilers
  3. Assemblers
  4. Text Editors
  5. Design GUI Application
  6. Print Spoolers
  7. Network Drivers
  8. Design Mobile Games and Desktop Game
  9. Modern Programs
  10. Data Bases
  11. Language Interpreters
  12. Utilities

In recent years C has been used as a general-purpose language because of its popularity with programmers. It is not the world's easiest language to learn and you will certainly benefit if you are not learning C as your first programming language! C is trendy (I nearly said sexy) - many well-established programmers are switching to C for all sorts of reasons, but mainly because of the portability that writing standard C programs can offer.

Which Level is C Language Belongs?

There are 3 levels of programming languages. They are,

Middle-Level languages:

Middle-level languages don’t provide all the built-in functions found in high-level languages but provide all building blocks that we need to produce the result we want. Examples: C, C++

High-Level languages:

High-level languages provide almost everything that the programmer might need to do is already built into the language. Example: Java, Python

Low-Level languages:

Low-level languages provide nothing other than access to the machines basic instruction set. Example: Assembler

C language is a Structured Language:

Structure oriented language:

In this type of language, large programs are divided into small programs called functions
Prime focus is on functions and procedures that operate on the data
Data moves freely around the systems from one function to another
Program structure follows “Top Down Approach”
Examples: C, Pascal, ALGOL and Modula-2
Object oriented language:
In this type of language, programs are divided into objects
Prime focus is in the data that is being operated and not on the functions or procedures
Data is hidden and cannot be accessed by external functions
Program structure follows “Bottom UP Approach”
Examples: C++, JAVA and C# (C sharp)
Non structure oriented language:
There is no specific structure for programming this language. Examples: BASIC, COBOL, FORTRAN

Wednesday, 16 October 2019

Prime Number Program in C++

Check Prime or Not in C++

To check whether the number is a prime number or not a prime number in C++ programming, you have to ask the user to enter a number and start checking for prime number. Here we write code Prime Number Program in C++
Prime number program in C++

If the number is divisible by 2 to one less than that number (n-1), then the number is not a prime number, otherwise it will be a prime number.

C++ Programming Code to Check Prime or Not

Following C++ program ask the user to enter a number to check whether it is a prime number or not, then display it on the screen:

/* C++ Program - Check Prime or Not */

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num,i,count=0;
cout<<"Enter a number:";
cin>>num;
for(i=2;i<num;i++)
{
if(num%i==0)
{
count++;
break;
}
}
if(count==0)
{
cout<<"This is a prime number";
}
else
{
cout<<"This is not a prime number";
}
getch();
}

When the above C++ program is compiled and executed, it will produce the following result. Above C++ Programming Example Output (for prime number):

Output
Enter a Number 17 This is a prime number
Enter a Number 20 This is not a prime number

Monday, 14 October 2019

Sunday, 13 October 2019

Static Keyword in Java

Static Keyword in Java

Here, we'll explore the static keyword of the Java language in detail. We'll find how we can apply keyword static to variables, methods, blocks, nested classes and what difference it makes.

Static Keyword in Java

The Anatomy of the static Keyword
In the Java programming language, the keyword static indicates that the particular member belongs to a type itself, rather than to an instance of that type.

This means that only one instance of that static member is created which is shared across all instances of the class.

The keyword can be applied to variables, methods, blocks and nested class.

The static Fields (Or Class Variables)

In Java, if a field is declared static, then exactly a single copy of that field is created and shared among all instances of that class. It doesn't matter how many times we initialize a class; there will always be only one copy of static field belonging to it. The value of this static field will be shared across all object of either same of any different class.

From the memory perspective, static variables go in a particular pool in JVM memory called Metaspace (before Java 8, this pool was called Permanent Generation or PermGen, which was completely removed and replaced with Metaspace).

Example of the static Field

Suppose we have a Car class with several attributes (instance variables). Whenever new objects are initialized from this Car blueprint, each new object will have its distinct copy of these instance variables.

However, suppose we are looking for a variable that holds the count of the number of Car objects that are initialized and is shared across all instances such that they can access it and increment it upon their initialization.

That's where static variables come in:

public class Car {
    private String name;
    private String engine;
   
    public static int numberOfCars;
   
    public Car(String name, String engine) {
        this.name = name;
        this.engine = engine;
        numberOfCars++;
    }

    // getters and setters
}

Now for every object of this class that gets initialized, the same copy of the numberOfCars variable is incremented. So for this case, the following assertions will be true:

public void whenNumberOfCarObjectsInitialized_thenStaticCounterIncreases() {
    new Car("Jaguar", "V8");
    new Car("Bugatti", "W16");

    assertEquals(2, Car.numberOfCars);
}
Compelling Reasons to Use static Fields

When the value of variable is independent of objects
When the value is supposed to be shared across all objects
3.3. Key Points to Remember
Since static variables belong to a class, they can be accessed directly using class name and don't need any object reference
static variables can only be declared at the class level
static fields can be accessed without object initialization
Although we can access static fields using an object reference (like ford.numberOfCars++) , we should refrain from using it as in this case it becomes difficult to figure whether it’s an instance variable or a class variable; instead, we should always refer to static variables using class name (for example, in this case, Car.numberOfCars++)
4. The static Methods (Or Class Methods)
Similar to static fields, static methods also belong to a class instead of the object, and so they can be called without creating the object of the class in which they reside. They're meant to be used without creating objects of the class.

Example of static Method

static methods are generally used to perform an operation that is not dependent upon instance creation.


If there is a code that is supposed to be shared across all instances of that class, then write that code in a static method:

public static void setNumberOfCars(int numberOfCars) {
    Car.numberOfCars = numberOfCars;
}
static methods are also widely used to create utility or helper classes so that they can be obtained without creating a new object of these classes.

Just take a look at Collections or Math utility classes from JDK, StringUtils from Apache or CollectionUtils from Spring framework and notice that all methods are static.

Compelling Reasons to Use static Methods

To access/manipulate static variables and other static methods that don't depend upon objects
static methods are widely used in utility and helper classes
Key Points to Remember

static methods in Java are resolved at compile time. Since method overriding is part of Runtime Polymorphism, so static methods can't be overridden
abstract methods can't be static
static methods cannot use this or super keywords
The following combinations of the instance, class methods and variables are valid:
Instance methods can directly access both instance methods and instance variables
Instance methods can also access static variables and static methods directly
static methods can access all static variables and other static methods
static methods cannot access instance variables and instance methods directly; they need some object reference to do so
A static Block

A static block is used for initializing static variables. Although static variables can be initialized directly during declaration, there are situations when we're required to do the multiline processing.

In such cases, static blocks come in handy.

If static variables require additional, multi-statement logic while initialization, then a static block can be used.

The static Block Example

Suppose we want to initialize a list object with some pre-defined values.

This becomes easy with static blocks:

public class StaticBlockDemo {
    public static List<String> ranks = new LinkedList<>();

    static {
        ranks.add("Lieutenant");
        ranks.add("Captain");
        ranks.add("Major");
    }
   
    static {
        ranks.add("Colonel");
        ranks.add("General");
    }
}
In this example, it wouldn't be possible to initialize List object with all the initial values along with declaration; and that's why we've utilized the static block here.

5.2. Compelling Reasons to Use static Blocks
If initialization of static variables requires some additional logic except the assignment
If the initialization of static variables is error-prone and requires exception handling
5.3. Key Points to Remember
A class can have multiple static blocks
static fields and static blocks are resolved and executed in the same order as they are present in the class

A static Class

Java programming language allows us to create a class within a class. It provides a compelling way of grouping elements that are only going to be used in one place, this helps to keep our code more organized and readable.

The nested class architecture is divided into two:


nested classes that are declared static are called static nested classes whereas,
nested classes that are non-static are called inner classes
The main difference between these two is that the inner classes have access to all member of the enclosing class (including private), whereas the static nested classes only have access to static members of the outer class.

In fact, static nested classes behaved exactly like any other top-level class but enclosed in the only class which will access it, to provide better packaging convenience.

Example of static Class

The most widely used approach to create singleton objects is through static nested class is it doesn't require any synchronization and is easy to learn and implement:

public class Singleton  { 
    private Singleton() {}
   
    private static class SingletonHolder { 
        public static final Singleton instance = new Singleton();
    } 

    public static Singleton getInstance() { 
        return SingletonHolder.instance; 
    } 
}
Compelling Reasons to Use a static Inner Class

Grouping classes that will be used only in one place increases encapsulation
The code is brought closer to the place that will be only one to use it; this increases readability and code is more maintainable
If nested class doesn't require any access to it's enclosing class instance members, then it's better to declare it as static because this way, it won't be coupled to the outer class and hence will be more optimal as they won't require any heap or stack memory

Key Points to Remember

static nested classes do not have access to any instance members of the enclosing outer class; it can only access them through an object's reference
static nested classes can access all static members of the enclosing class, including private ones
Java programming specification doesn't allow us to declare the top-level class as static; only classes within the classes (nested classes) can be made as static

Some Website for Learn Static Keyword in Java Are;

1. JavaTpoint
2. StudyTonight
3. TutorialsPoint
4. C4Learn
5. Progrimbiz

Thursday, 30 May 2019

Ternary Operator in C

Ternary Operator in C

Today we discuss about Ternary Operator in C. The ternary operator is an operator that takes three arguments. The first argument is a comparison argument, the second is the result upon a true comparison, and the third is the result upon a false comparison. Ternary operator is shortened way of writing an if-else statement.

Ternary Operator in C

Ternary operator is also said to be conditional operator. Ternary operator is a?b:c it say that the condition a is true b will be executed else C will be executed.

Example for Ternary Operator in C

#include<stdio.h>
int main()
{
int a=2,b=4,c=9;
int lar;
lar=(((a>b)&&(a>c))?a:((b>c)?b:c));
printf(“Largest Number is %d”,lar);
return 0;
}

Output: Largest Number is 9

Thursday, 3 May 2018

C++ Program

C++ Program

C++ is very simple and programming language in learn and write code. Here i will give you some most important C++ Programs which is frequently asked in any written exam at fresher level and experience level.

Some Important C++ Programs are;
  • Even Odd Program in C++
  • Prime number program in C++
  • Armstrong number program
  • Palindrome number program
  • Sum of two number
  • Reverse number
  • Reverse String
  • Convert Celsius to Fahrenheit
  • Convert Fahrenheit to Celsius
  • Calculate Simple Interest
  • Compare two string
  • Copy string
  • Delete array element
  • Delete Duplicate array element
  • Delete element at specific position
  • Print Number Series
  • Print Pascal Triangle
If you want more Basic Programs related to C++ comment below and you can direct mail me hitesh.xc@gmail.com.