Nested Loops and Jumping Statements(Loop Control Statements), Goto statement in C, Return Statement in C Exit statement in C, For Loops with Nested Loops, While Loop with Nested Loop, Do-While Loop with Nested Loops, Break Statement, Continue Statement : visit us at : www.rozyph.com
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
This presentation is Unary operator overloading(prefix).
Here ,I try to describe how to Unary operator overloaded and its types with example. may be you can happily read this.
Note: This slide was created by me. I am Md. Touhidul Islam Shawan. Here in these slide I have written about some basic points of function of c program and how the function works.
A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions. You can divide up your code into separate functions.
Note: This slide was created by me. I am Md. Touhidul Islam Shawan. Here in these slide I have written about some basic points of function of c program and how the function works.
A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions. You can divide up your code into separate functions.
Osmangazi Üniversitesinde Ders Notu olarak kullanılan temel bir C++ kilavuzudur. Hedef kitlesi matematikçiler olup, C++ diline yeni başlayan mühendislere de yol gösterebilir.
Anlatımda kavramlar üzerine çok durulmamıştır, adından anlaşılacağı üzere en sade hali ile verilmeye çalışılmıştır.
Yararlı olması dileği ile
Muhammet ÇAĞATAY
http://muhammetcagatay.com/
Introduction to control structure in C Programming Language include decision making (if statement, if..else statement, if...else if...else statement, nested if...else statement, switch...case statement), Loop(for loop, while loop, do while loop, nested loop) and using keyword(break, continue and goto)
C lecture 3 control statements slideshareGagan Deep
Control Statement in C, Looping in C, Conditional and Unconditional Statements, For Loop, While Loop, Do-While Loop, C Programming, Examples : Visit us at www.rozyph.com
this slide is for to understand the conditions which are applied in C++ programming language. I hope u would understand better by viewing this presentation.
Similar to C lecture 4 nested loops and jumping statements slideshare (20)
C Programming : Arrays, One Dimensional Arrays, Two Dimensional Arrays, Three Dimensional Arrays, Operations on Arrays like Insertion, Deletion, Searching, Sorting, Merging, Traversing, Matrix Manipulation like Addition, Multiplication etc. : Visit us at : www.rozyph.com
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
2. Nested Loops
Loops, like if-else statements, can be nested, one within
another.
The inner and outer loops need not be generated by the
same type of control structure.
It is essential, however, that one loop be completely
embedded within the other - there can be no overlap.
Each loop must be controlled by different index.
Moreover, nested control structure can involve both loops
and if-else statement.
Thus, a loop can be nested within an if-else statement,
and an if-else statement can be nested within a loop.
The nested structure may be complex as necessary, as
determined by the program logic.
3. Tables of 1-10 Program 1-4
#include <stdio.h>
void main()
{ int i,j;
for (i=1; i<=10; i++)
for(j=1; j<=10; j++)
printf(“%d ”, i*j);
Prints 1 2 3 ..10 2 4 6 ..20 ………10 20 30 ……..100
#include <stdio.h>
void main()
{ int i=1,J;
while(i<=10)
{ for (j=1; j<=10; j++)
printf(“ %dt”, i*j);
i++; } }
#include <stdio.h>
void main()
{ int i=1,j=1;
while(i<=10)
{ while(j<=10)
{ printf(“ %d”, i*j);
j++;}
i++;} }
#include <stdio.h>
void main()
{ int i,j =1;
for (i=1; i<=10; i++)
d0
{ printf(“%dn ”, i*j);
j++; }
while(j<=10) ; }
4. Program 5-6
Check Palindrome Number from
11 to 500
#include<stdio.h>
void main()
{int i, r, T, rn=0;
for ( i = 11; i<=500; i++) {
T=i;
while (T!=0) {
r=T%10; T=T/10 ;
rn=rn*10+r; }
if (rn==i)
printf(“%d is Palindrome Number”, );
else
printf(“%d is Non-Palindrome Number);
} }
Check Palindrome Number from 11 to
500
#include<stdio.h>
void main()
{int n=11,r, T, rn=0;
while(n<=500) {
T=n;
while (T!=0) {
r=T%10; T=T/10 ;
rn=rn*10+r; }
if (rn==n)
printf(“%d is Palindrome Number”, );
} }
5. Jumping Statements
Jumping statements are also known as Loop Control
Statements.
Jumping statements are of different types
break
continue
goto
return
exit ()
6. break Statements
break statement simply terminates the loop and takes
control out of the loop. Here explained break statement for
for Loop
for(…………….)
{
.. . . . . . . .
.. . . . . . . .
if (condition)
break;
.. . . . . . . .
.. . . . . . . .
}
8. Print sum of infinite numbers.
#include <stdio.h>
void main ()
{ int a, sum=0;
for( ; ; )
{ scanf(“%d”, &a);
if (a==-999)
break;
sum=sum+a; }
printf(“The sum is %d”,
sum); }
8. Continue Statement
Continue is used for skipping a part of loop for some
condition.
Continue causes the remaining code inside a loop block
to be skipped and causes execution of jump to the top
of loop block
for(…………….)
{
.. . . . . . . .
.. . . . . . . .
if (condition)
continue;
.. . . . . . . .
.. . . . . . . .
}
12 Print 1-10 numbers except 3 and 7
#include <stdio.h>
void main ()
{
int i;
for(i=1 ; 1<=10 ; i++)
{
if ((i==3)||(i==7))
continue;
printf(“ %dt”, i);
} }
10. goto statement
goto label1
. . . . . . . . . .
. . . . . . . . . .
label2:
. . . . . . . . . .
. . . . . . . . . .
label1:
. . . . . . . . . .
. . . . . . . . . .
goto label2
The goto statement is used to alter the
normal sequence of program
execution by transferring control to
some other part of the program
unconditionally/conditionally.
In its general form, the goto
statement is written as
goto label;
where the label is an identifier that
is used to label the target statement to
which the control is transferred.
label : statement;
Each labeled statement within the
function must have a unique label,
i.e., no two statement can have the
same label.
11. return statement and exit()
return is an instruction of the language that returns from a
function call.
exit is a system call (not a language statement) that
terminates the current process.
12. Print Prime numbers in between 2-100 Prog. 16
#include <stdio.h>
void main ()
{
int i, j;
for(i=2; i<100; i++)
{
for(j=2; j <= (i/j); j++)
if(!(i%j))
break;
// if factor found, not prime
if(j > (i/j))
printf ("%d is primen", i);
}
}
13. Examples of Pyramid Program 17
#include <stdio.h>
void main()
{
int i,j,l;
printf(“Number of lines: ");
scanf("%d",&l);
for(i=1;i<=l;++i)
{
for(j=1;j<=i;++j)
printf("* "); // printf(“j ");
printf("n");
}
}
* 1
** 12
*** 123
**** 1234
***** 12345
14. Do Yourself
Count even and digits of a number
Sum of even and odd digits of a number
Check for Armstrong Number
Fibonacci Sequence
Prime number when divide upto n/2 and sqrt of n
15. If you have any queries you can
contact me at :
rozygag@yahoo.com