Wednesday, March 25, 2020

switch sample program


#include <stdio.h>

int main()
{
   int a,b,c,d,m,n,o;
   printf("if your are press one it is use to add\n");
   printf("if you are press two for subration\n");
   scanf("%d",&a);
   switch(a)
   {
       case 1:
   
       printf("Enter any two umber:");
       scanf("%d%d",&b,&c);
       d=b+c;
       printf("%d",d);
       break;
     
       case 2:
   
       printf("Enter any two number: ");
       scanf("%d%d",&m,&n);
       printf("%d",o);
       o=m-n;
       break;
   }
   return 0;
}

Sunday, March 22, 2020

c program for swap a two number

#include<stdio.h>
int main()
{
    int a,b;
    scanf("%d%d",&a,&b);
    printf("before swaping %d %d\n",a,b);
    printf("after swapig: %d %d",b,a);
    return 0;
}

Thursday, March 19, 2020

TO FIND ASCII VALUE PROGRAM ANS


TO FIND THE ASCII VALUE PROGRAM

#include <stdio.h>

int main()
{
 char c;
 scanf("%c",&c);
 printf("This is the ASCCI value %c=%d",c,c);
    return 0;
}

adding two numbers

#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d%d",&a,&b);
 c=a+b;
printf("%d",c);
return 0;

}

program for to find the big number

#include <stdio.h>

int main()

{

 int a,b;

scanf("%d%d",&a,&b);

if(a>=b)

printf("%d it is greater number",a);

else

printf("it is greater number  %d",b);
return 0;

}

Wednesday, March 18, 2020

c++ hello world

C++ "Hello, World!" Program

In this example, we will learn to create a simple program named "Hello World" in C++ programming.



"Hello, World!" is a simple program that outputs Hello, World! on the screen. Since it's a very simple program, it's often used to introduce a new programming language to a newbie.
Let's see how C++ "Hello, World!" program works.

C++ "Hello World!" Program

// Your First C++ Program

#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}
Output
Hello World!



Working of C++ "Hello World!" Program

  1. // Your First C++ Program

    In C++, any line starting with // is a comment. Comments are intended for the person reading the code to better understand the functionality of the program. It is completely ignored by the C++ compiler.
  2. #include <iostream>

    The #include is a preprocessor directive used to include files in our program. The above code is including the contents of the iostream file.

    This allows us to use cout in our program to print output on the screen.

    For now, just remember that we need to use #include <iostream> to use cout that allows us to print output on the screen.
  3. int main() {...}

    A valid C++ program must have the main() function. The curly braces indicate the start and the end of the function.

    The execution of code beings from this function.
  4. std::cout << "Hello World!";

    std::cout prints the content inside the quotation marks. It must be followed by << followed by the format string. In our example, "Hello World!" is the format string.

    Note: All C++ statements must always end with a ;.
  5. return 0;

    The return 0; statement is the "Exit status" of the program. In simple terms, the program ends with this statement.
  6. Things to take away

    • We use std:cout in order to print an output on our screen.
    • We must include iostream if we want to use std::cout.
    • The execution of code begins from the main() function. This function is mandatory. This is a valid C++ program that does nothing.
    int main() {
        // Write your code here
    }

c++ syllabus


Typical Course Schedule

WeekTopic
1
Chapter 1 - Introduction to Computers and Programming
Chapter 2 - Introduction to C++
Chapter 3 - Expressions and Interactivity
2
Chapter 4 - Making Decisions (Selection)
Chapter 5 - Looping (Repetition)
3
Chapter 6 - Functions
4
Chapter 7 - Introduction to Classes and Objects
5
Chapter 7 (continued)
6
EXAM 1
7
Chapter 8 - Arrays
8
Chapter 8 (continued)
9
Chapter 9 – Searching, Sorting and Algorithm Analysis
10
Chapter 10 – Pointers
11
EXAM 2
12
Chapter 11 - More about Classes and OOP (selected topics)
13
Chapter 12 - More about Characters, Strings, and the string Class
14
Chapter 13 - Advanced File and I/O Operations
15
Chapter 14 - Recursion (selected topics)
Chapter 17 - Linked Lists (selected topics)
16
Exam 3

cisco Cybersecurity Essentials Quiz 8 answer in bold

Question  1 Correct Mark 2.00 out of 2.00 Flag question Question text A company has had several incidents involving users downloading unauth...