2020

C VS C++

C++ was developed by Bjarne Stroustrup at Bell labs in 1979, as an extension to the C language.

The major difference between C and C++ is that C is a procedural programming language; which means that it is derived from sequential step by step structured programming. Some of it's applications includes scheduling running of other programs, designing games, graphics etc.

On the other hand C++ is a combination of procedural programming as well as object oriented programming. Objects consists of Data in form of it's characteristics and are coded in the form of methods. In object oriented programming computer programs are designed using the concept of objects that interact with the real world.

C++ For Complete Beginners With Certification


Some other differences includes:

Since C is a procedural programming, it is a function driven language.

C++ is an object driven language.

In C, functions cannot be defined inside structures

In C++, functions can be used inside a structure.

C uses functions for input/output. For example scanf and printf.

C++ uses objects for input output. For example cin and cout.

C does not provide direct support for error handling (also called exception handling)

C++ provides support for exception handling. Used for errors that make the code incorrect.

C does not support reference variables.

C++ supports reference variables.


C++ Syntax

 

The following code is written in C++

We shall look at each element of the following code in detail to understand the syntax of C++

 

#include <iostream>
using namespace std;

int main() 
{
    cout <<"Hello World.";
    return 0;
}

 

#include <iostream>: This is a header file library. <iostream> stands for standard input-output stream. It allows us to include objects such as cin and cout, cerr etc.

 

using namespace std: Means that names for objects and variables can be used from the standard library. It is also used as additional information to differentiate similar functions. 

 

int main(): The function main is called just as in C. Any code inside its curly brackets {} will be executed.

 

cout: is an object used to print a particular text after << in quotes. In our example it will output "Hello World". (for personal reference we can say it is similar to printf in c)

 

return 0: Terminates the function main

 

Note:

1) Every C++ statement ends with a semicolon ';'

2) Compiler ignores white spaces. Multiple line spaces are used to make the code more readable.

 

Omitting Name spaces:

C++ programs run without the standard namespace library. This can be done by writing std keyword followed by :: operator inside int main()

Example:

#include <iostream> 

int main() 

std::cout <<"Hello World"; 

return 0; 

}

Output(Print Text)

 

Using the cout object

As discussed earlier the cout object, together with the << operator, is used to output values/print text.

 

You can add as many cout objects as you want. However, note that it does not insert a new line at the end of the of each object all of them will be printed in a single line.

 

Example:

 

#include <iostream>
using namespace std;


int main() {
  cout << "Demo Code.";
  cout << "I am learning C++.";
  cout << "Print text.";

    return 0;
}

Output:

Demo Code.I am learning C++.Print text.

 

 

New Lines

 

In order to insert a new line after each object declaration \n is used. Or another way to do so is using end1 manipulator

#include <iostream>
using namespace std;
int main() {
  cout << "Demo Code.\n";
  cout << "I am learning C++" <<end1;
  cout << "print text";

  return 0;
}

 

Output:

Demo Code.
I am learning C++
print text

Note: \n is the preferred way to break lines.


User Input

 

As we have already discussed earlier cin is used to get user input. This is paired along with the extraction operator (>>)

 

The following example reads a value from the user and prints it on the screen.

Example:

 

#include <iostream>
using namespace std;

int main()
{
  int num;
  cout << "Type a number: "; // displayed on the screen
  cin >> num; //value taken from User
  cout << "Your number is: " << x; // number displayed on the screen

  return 0;
}

Code Your First Game: Arcade Classic in JavaScript on Canvas


Program a complete game today. No special software or install required. All you need is a text editor and a web browser.
Rating: 4.6/5 (22,878)
Enrolled: 246,888 Students
Hours: 2 Hours 10 Minutes
Created By: 
Chris DeLeon-Chris has been making games for 23 years. He's worked with startups and AAA games, taught game creation at Georgia Tech, and spoken at more than 10 conferences (including GDC, IndieCade, and SIEGE). Over 200,000 students have done his online courses, and he's made hundreds of videos and 140 podcast industry interviews to help people discover game development. Today he runs HomeTeam GameDev, where people around the world learn game development together in a practical way building long-term remote team projects, with included access to 1-on-1 support and ongoing mentorship.
Code Your First Game: Arcade Classic in JavaScript on Canvas

Learn The Following :
  • Display, position, and move filled shapes for retro and prototype gameplay
  • Move a ball around your game space such that it bounces off boundaries
  • Handle real-time mouse input
  • Detect and respond to simple collisions
  • Program very basic artificial intelligence
  • Keep and display score during play
  • Understand the subtle, key difference between a classic game in this style which is fun to play versus one that isn't
  • Define and code a win condition and end state for your game
Requirements :
  • Very early on students will need to show file extensions in their operating system (explained briefly in the video)
  • If a plain text editor is available that has programming features like line numbers and auto-indent (ex. Notepad++ on PC, TextWrangler on Mac) that may be handy but is not necessary, as a generic text editor like Notepad or TextEdit will work fine for a program of this size
Who is The Course For :
  • This is for anyone who wants a quick but thorough introduction to simple game programming in a way that doesn't require any special software, download, or installation
  • If you've had at least a little exposure to generic programming concepts like variables, functions, and if-statements you'll have an advantage, however in case you've never heard those terms they're explained briefly as they come up
  • Although this a uses JavaScript and HTML5, it is not intended for someone who is focused on learning HTML5/JS for web page design
Enroll Now :  Click here

Disclaimer :  Most of material are used from internet and this blog is only for educational(student) purpose

Read More: 
The A-Z guide to Artificial Intelligence -  Click here

Cloud Engineering with Google Cloud Professional Certificate - Click here

Cloud Engineering with Google Cloud Professional Cloud Engineering with Google Cloud Professional Certificate

Offered BY :Google Cloud

Enrolled:18,715 
CLOUD ENGINEERING


WHAT YOU WILL LEARN

Learn the skills needed to be successful in a cloud engineering role

Prepare for the Associate Cloud Engineer certification

Learn about the infrastructure and platform services provided by Google Cloud Platform

Learn about the infrastructure and platform services provided by Google Cloud Platform

Understand the purpose and intent of the Associate Cloud Engineer certification and its relationship to other Google Cloud certifications.

  • Outcomes:
  • 1.Started a new career after completing this specialization.
  •   2.Got a pay increase or promotion.
  • Skills after Course You will Gain :
  • Google Compute Engine
  • Google App Engine
  • Debugging

    Features:


    APPLY NOW:


    What is Artificial Intelligence?
    Artificial Intelligence (AI) is the branch of computer sciences that emphasizes the development of intelligence machines, thinking and working like humans. For example, speech recognition, problem-solving, learning and planning.


    ARTIFICIAL INTELLIGENCE A-Z GUIDE 

    WHAT ARE THE USES FOR AI?

    AI is ubiquitous today, used to recommend what you should buy next online, to understand what you say to virtual assistants such as Amazon's Alexa and Apple's Siri, to recognise who and what is in a photo, to spot spam, or detect credit card fraud.
    WHAT ARE THE DIFFERENT TYPES OF AI?
    At a very high level artificial intelligence can be split into two broad types
    1.Narrow Artificial Intelligence
    2.General Artificial Intelligence
    What Can Narrow AI do?
    Narrow AI is AI that is programmed to perform a single task — whether it's checking the weather, being able to play chess, or analyzing raw data to write journalistic reports. ANI systems can attend to a task in real-time, but they pull information from a specific data-set.
    There are many examples of narrow AI around us every day, represented by devices like Alexa, Google Assistant, Siri, and Cortana. They include:
    • Self-driving cars
    • Facial recognition tools that tag you in pictures
    • Customer service bots that redirect inquiries on a webpage
    • Google’s page-ranking technology that determines which websites appear at the top of the search engine
    • Recommendation systems showing items that could be useful additions to your shopping cart based on browsing history
    • Spam filters that keep your inbox clean through automated sorting
    Here are some of the barriers to ANI:
    • ANI needs a large amount of high-quality data to yield accurate results, and not all environments meet these data requirements.
    • The learning curve to institutionalize AI properly can be steep. Companies have to set up and train their staff on new processes and technologies.
    • If a task changes, the effectiveness of an ANI system decreases, since it is programmed for a specific purpose.
    • Sometimes, replacing humans with rules-based machines leads to greater frustration and lowers customer satisfaction—for example, in the hospitality industry, where guests value personalized service and human interaction. 

    WHAT CAN GENERAL AI DO?

    Artificial general intelligence is very different, and is the type of adaptable intellect found in humans, a flexible form of intelligence capable of learning how to carry out vastly different tasks, anything from haircutting to building spreadsheets, or to reason about a wide variety of topics based on its accumulated experience. This is the sort of AI more commonly seen in movies, the likes of HAL in 2001 or Skynet in The Terminator, but which doesn't exist today and AI experts are fiercely divided over how soon it will become a reality.
    Real Examples:
    Is Siri narrow AI?
    Siri is a narrow artificial intelligence algorithm that brings the functions of machine learning to the mobile platform of an iPhone. While Siri is helpful at completing various specific tasks, it is by no means a strong AI, and often has challenges with tasks outside its range of abilities.

    Why is artificial intelligence important?

    AI automates repetitive learning and discovery through data.
    Instead of automating manual tasks, AI performs frequent, high-volume, computerized tasks reliably and without fatigue. For this type of automation, human inquiry is still essential to set up the system and ask the right questions.

    AI adds intelligence to existing products. In most cases, AI will not be sold as an individual application. Rather, products you already use will be improved with AI capabilities, much like Siri was added as a feature to a new generation of Apple products.

    I adapts through progressive learning algorithms to let the data do the programming. AI finds structure and regularities in data so that the algorithm acquires a skill: The algorithm becomes a classifier or a predictor. So, just as the algorithm can teach itself how to play chess, it can teach itself what product to recommend next online. And the models adapt when given new data. Back propagation is an AI technique that allows the model to adjust, through training and added data, when the first answer is not quite right.

    AI analyzes more and deeper data using neural networks that have many hidden layers. Building a fraud detection system with five hidden layers was almost impossible a few years ago. All that has changed with incredible computer power and big data. You need lots of data to train deep learning models because they learn directly from the data. The more data you can feed them, the more accurate they become.

    AI achieves incredible accuracy through deep neural networks – which was previously impossible. For example, your interactions with Alexa, Google Search and Google Photos are all based on deep learning – and they keep getting more accurate the more we use them. In the medical field, AI techniques from deep learning, image classification and object recognition can now be used to find cancer on MRIs with the same accuracy as highly trained radiologists.

    AI gets the most out of data. When algorithms are self-learning, the data itself can become intellectual property. The answers are in the data; you just have to apply AI to get them out. Since the role of the data is now more important than ever before, it can create a competitive advantage. If you have the best data in a competitive industry, even if everyone is applying similar techniques, the best data will win.

    How Artificial Intelligence Works

    AI works by combining large amounts of data with fast, iterative processing and intelligent algorithms, allowing the software to learn automatically from patterns or features in the data. AI is a broad field of study that includes many theories, methods and technologies, as well as the following major subfields: 

    Artificial Intelligence Course | AI Training & Certification‎

    Introduction to Artificial Intelligence

    Offered by NPTEL


    Session
    Duration:
    Commitment: 4 Hours per week.


    What will you learn

    This course covers the introductory concepts of Artificial Intelligence, inherent challenges in developing an Intelligent System, key paradigms of AI, core techniques and technologies.

    This course is covered in around 40 lectures and would include the following areas of learning:

     -Introduction to AI and intelligent agents
     -Problem Solving by Searching, heuristic search techniques and other methods
     -Game Playing
     -Knowledge Representation
     -Planning, partial order planning
     -Reasoning
     -Learning
     -Introduction to Natural Language Processing

    Who would benefit?

    This course has been designed for the students and teachers of the Computer Science & Engineering department associated with Artificial Intelligence.
    Since this course is just the stepping stone to the vast field of AI, it can help the aspirants to be familiarized with the concepts of Artificial Intelligence and its role in the fields of Science & Engineering.

    Prerequisites

    This is a basic course to the concepts of Artificial Intelligence and developing an Intelligent System, its challenges and solutions. So, aspirants having concepts of Data Structures, Algorithms and basic mathematics can take up this course.
    DEMO CERTIFICATE: 


    APPLY NOW :   CLICK HERE 

    MKRdezign

    Contact Form

    Name

    Email *

    Message *

    Powered by Blogger.
    Javascript DisablePlease Enable Javascript To See All Widget