What’s Knowledge abstraction? Knowledge abstraction permits a program to disregard the small print of how an information sort is represented. […]
Tag: C Tutorial
C++ Encapsulation
C++ Encapsulation As you all know that C++ is wealthy in Objects and Lessons. So, it comes below Object Oriented […]
Polymorphism in C++
The time period Polymorphism get derived from the Greek phrase the place ‘poly’ + ‘morphos’ the place ‘poly’ means many […]
Inheritance in C++ with Example
C++ Inheritance Reusability is yet one more necessary characteristic of Object Oriented Programming (OOP). It’s a good observe if programmers […]
C++ Friend Virtual Function
C++ Good friend Perform In C++ a perform or a complete class could also be declared to be a buddy […]
C++ Files and Streams
In C++ programming we’re utilizing the iostream normal library, it supplies cin and cout strategies for studying from enter and […]
C++ Basic Example for student and Programmer
C++ Applications 1. Test No. is Prime or Not Prime.
1 |
<span class="com">#embody</span><span class="str"><iostream.h></iostream.h></span><span class="com">#embody</span><span class="str"><conio.h></conio.h></span><span class="kwd">void</span><span class="pln"> foremost</span><span class="pun">()</span><span class="pun">{</span> <span class="kwd">int</span><span class="pln"> i</span><span class="pun">,</span><span class="kwd">no</span><span class="pun">;</span><span class="pln"> clrscr</span><span class="pun">();</span><span class="pln"> cout</span><span class="pun"><<</span><span class="str">"Enter any num: "</span><span class="pun">;</span><span class="pln"> cin</span><span class="pun">>></span><span class="kwd">no</span><span class="pun">;</span> <span class="kwd">if</span><span class="pun">(</span><span class="kwd">no</span><span class="pun">==</span><span class="lit">1</span><span class="pun">)</span> <span class="pun">{</span><span class="pln"> cout</span><span class="pun"><<</span><span class="str">"Smallest prime num is 2"</span><span class="pun">;</span> <span class="pun">}</span> <span class="kwd">for</span><span class="pun">(</span><span class="pln">i</span><span class="pun">=</span><span class="lit">2</span><span class="pun">;</span><span class="pln">i</span><span class="pun"><</span><span class="kwd">no</span><span class="pun">;</span><span class="pln">i</span><span class="pun">++)</span> <span class="pun">{</span> <span class="kwd">if</span><span class="pun">(</span><span class="kwd">no</span><span class="pun">%</span><span class="pln">i</span><span class="pun">==</span><span class="lit">0</span><span class="pun">)</span> <span class="pun">{</span><span class="pln"> cout</span><span class="pun"><<</span><span class="str">"Not prime num"</span><span class="pun">;</span> <span class="kwd">break</span><span class="pun">;</span> <span class="pun">}</span> <span class="pun">}</span> <span class="kwd">if</span><span class="pun">(</span><span class="kwd">no</span><span class="pun">==</span><span class="pln">i</span><span class="pun">)</span> <span class="pun">{</span><span class="pln"> cout</span><span class="pun"><<</span><span class="str">"Prime num"</span><span class="pun">;</span> <span class="pun">}</span><span class="pln"> getch</span><span class="pun">();</span><span class="pun">}</span> |
1 |
Enter any num: 10Not Prime Num |
2. Print subsequent Prime quantity. Once we enter […]
C++ Object Oriented Programming
This tutorial sequence will enable you to to get began in C++ Programming Language from its fundamentals. C++ is […]
C++ interview Question
C++ interview Query 1. What’s the full type of OOPS? Object Oriented Programming System. 2. What’s a category? Class is […]
C Programming Language Tutorial
C Programming Language Tutorial C language Tutorial with programming strategy for rookies and professionals, lets you perceive the C language […]
History of C Programming Language
Historical past of C Programming Language C was initially developed by Dennis Ritchie between 1969 and 1973 at Bell […]
C Language Features
C Language Options C is the extensively used language. We will use C for various functions. Under are a few […]
C install
C set up There are various compilers obtainable for c and c++. It is advisable to download anyone. Right […]
My First C language Program
My First C language Program Lets see easy methods to write a easy c program
1 |
#embody <stdio.h>#embody <conio.h>int essential(){ printf(" C is a programming language"); getch();}</conio.h></stdio.h> |
Completely different components […]
Variable in C Programming Language
Variable in C Language Variables is a reminiscence areas.This location is used to retailer the worth of the variable. […]
Data Types in C Language
Knowledge Sorts in C Language Within the C programming language, knowledge sorts are declarations for reminiscence places or variables […]
Keyword in C language
Key phrase in C language Key phrase are reserved phrase which are pridefine in ‘c’ library. They will’t be […]
Constant in C Programming
Fixed in C Sorts of Fixed in C It’s an identifier whose worth cannot be modified on the execution time […]
Decision making statement in C
Resolution Making Assertion Resolution Making Assertion Resolution making assertion is relying on the situation block should be executed or […]
If Statement In C Programming
If Assertion if-then Assertion if-then is most simple assertion of Determination making assertion. It tells to program to execute […]