SlideShare a Scribd company logo
SAMPLE TEST C-- PROGRAMS
Sample1.C
/* SAMPLE1.C: An example program for the C-- compiler */
main()
{
printf("Hello, world!n");
}
Output Executable File: Sample1.COM
Compiler Screen:
Sample6.C
/* SAMPLE6.C: An example program for the C-- Compiler */
int a, b, c;
int d;
int e, f;
main()
{
printf("nSAMPLE6.C: A C-- example programn");
a=7;
b=6;
c=5;
d=4;
e=3;
f=2;
printf("na =", a);
printf("nb =", b);
printf("nc =", c);
printf("nd =", d);
printf("ne =", e);
printf("nf =", f);
printf("na+b =", a+b);
printf("nd-c =", d-c);
printf("ne*f =", e*f);
printf("na/e =", a/e);
printf("na%d =", a%d);
printf("na+b-c*d/e%f =", a+b-c*d/e%f);
printf("nf+e-d*c/b%a =", f+e-d*c/b%a);
printf("n");
}
Output Executable File: Sample6.COM
Compiler Screen:
Sample7.C
/* SAMPLE7.C: An example program for the C-- Compiler */
int a, b, c;
main()
{
b=10;
printf("nb =", b);
for (a=1; a<b; a++) {
printf("na =",a);
}
}
Output Executable File: Sample7.COM
Compiler Screen:
Sample9.C
/* SAMPLE9.C: An example program for the C-- Compiler */
int a, b, c;
main()
{
printf("nSAMPLE9.C: A C-- example programn");
a=1;
b=20;
if (a>=b) {
printf("Truenn");
}else {
printf("Falsenn");
}
while (a<=b) {
printf("a =",a, ", ");
a++;
}
printf("nn");
do {
printf("a =",a, ", ");
a--;
} while (a>1);
printf("n");
}
Output Executable File: Sample9.COM
Compiler Screen:
Sample20.C
/* SAMPLE20.C: An example program for the C-- Compiler */
int a, , b, c;
int d;
int e, f;
main(
{
printf("nSAMPLE20.C: A C-- example programn");
a=10;
b=5;
c=a+b*c+20;
printf"a=",a;
printf("g=" g);
printf"c=",c);
}
Output Executable File: None
Compiler Screen:
Sample21.C
/* SAMPLE21.C: An example program for the C-- Compiler */
int a, , b, c;
int d;
int e, f;
main(
{
printf("nSAMPLE21.C: A C-- example programn");
b=5;
c=a+b*c+20;
printf();
printf"a=",a);
printf("b=",b);
printf("c=",c;
}
Output Executable File: None
Compiler Screen:
Sample22.C
/* SAMPLE22.C: An example program for the C-- Compiler */
int a, , b, c;
int d;
int e, f;
main(
{
printf("nSAMPLE22.C: A C-- example programn");
a=10;
c=a+b c+20;
printf();
printf"a=",a);
printf("c=",c;
}
Output Executable File: None
Compiler Screen:

More Related Content

PPT
Class and object in C++
PPTX
Applets in java
PPTX
Simple Calculator Flowchart
PDF
Data Structures Practical File
DOCX
Os lab file c programs
DOCX
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
PPTX
Functions in c
PDF
Online examination system
Class and object in C++
Applets in java
Simple Calculator Flowchart
Data Structures Practical File
Os lab file c programs
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Functions in c
Online examination system

What's hot (20)

PDF
file handling c++
PPTX
String in c programming
PPTX
Python dictionary
PPSX
C# - Part 1
PPTX
Inheritance in c++
PPTX
Nesting of if else statement & Else If Ladder
PPTX
Inline Functions and Default arguments
PPT
Java: GUI
PPTX
Operators in java
PDF
Introduction to c++ ppt 1
PPTX
Java/Servlet/JSP/JDBC
PPT
Method overriding
PPTX
Intro to c++
DOC
C lab-programs
PDF
Web Technology Lab files with practical
DOC
Infix to-postfix examples
PPT
Simple Java Programs
PPT
Introduction to Basic C programming 01
PDF
Chapter 6 Balagurusamy Programming ANSI in c
ODP
Multithreading In Java
file handling c++
String in c programming
Python dictionary
C# - Part 1
Inheritance in c++
Nesting of if else statement & Else If Ladder
Inline Functions and Default arguments
Java: GUI
Operators in java
Introduction to c++ ppt 1
Java/Servlet/JSP/JDBC
Method overriding
Intro to c++
C lab-programs
Web Technology Lab files with practical
Infix to-postfix examples
Simple Java Programs
Introduction to Basic C programming 01
Chapter 6 Balagurusamy Programming ANSI in c
Multithreading In Java
Ad

Similar to C-- Sample Programs and Screenshots (20)

DOCX
The basics of c programming
PDF
C programming
PPTX
Overview of C Mrs Sowmya Jyothi
PPTX
cmp104 lec 8
DOCX
C language industrial training report
PPTX
Introduction%20C.pptx
PPTX
C Programming - Basics of c -history of c
PPTX
1.1 programming fundamentals
DOC
Basic c
PPT
Introduction to C
PPTX
Introduction to c programming
PPTX
Introduction to c programming
PDF
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
PPT
Lecture 01 2017
PPT
270_1_CIntro_Up_To_Functions.ppt
PPT
270_1_CIntro_Up_To_Functions.ppt
PPT
Survey of programming language getting started in C
PPT
270 1 c_intro_up_to_functions
The basics of c programming
C programming
Overview of C Mrs Sowmya Jyothi
cmp104 lec 8
C language industrial training report
Introduction%20C.pptx
C Programming - Basics of c -history of c
1.1 programming fundamentals
Basic c
Introduction to C
Introduction to c programming
Introduction to c programming
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
Lecture 01 2017
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
Survey of programming language getting started in C
270 1 c_intro_up_to_functions
Ad

Recently uploaded (20)

PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Nekopoi APK 2025 free lastest update
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
assetexplorer- product-overview - presentation
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Design an Analysis of Algorithms I-SECS-1021-03
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Designing Intelligence for the Shop Floor.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
Nekopoi APK 2025 free lastest update
wealthsignaloriginal-com-DS-text-... (1).pdf
Salesforce Agentforce AI Implementation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
iTop VPN Free 5.6.0.5262 Crack latest version 2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
assetexplorer- product-overview - presentation
Download FL Studio Crack Latest version 2025 ?
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus

C-- Sample Programs and Screenshots

  • 1. SAMPLE TEST C-- PROGRAMS Sample1.C /* SAMPLE1.C: An example program for the C-- compiler */ main() { printf("Hello, world!n"); }
  • 2. Output Executable File: Sample1.COM Compiler Screen:
  • 3. Sample6.C /* SAMPLE6.C: An example program for the C-- Compiler */ int a, b, c; int d; int e, f; main() { printf("nSAMPLE6.C: A C-- example programn"); a=7; b=6; c=5; d=4; e=3; f=2; printf("na =", a); printf("nb =", b); printf("nc =", c); printf("nd =", d); printf("ne =", e); printf("nf =", f); printf("na+b =", a+b); printf("nd-c =", d-c); printf("ne*f =", e*f); printf("na/e =", a/e); printf("na%d =", a%d); printf("na+b-c*d/e%f =", a+b-c*d/e%f); printf("nf+e-d*c/b%a =", f+e-d*c/b%a); printf("n"); }
  • 4. Output Executable File: Sample6.COM Compiler Screen:
  • 5. Sample7.C /* SAMPLE7.C: An example program for the C-- Compiler */ int a, b, c; main() { b=10; printf("nb =", b); for (a=1; a<b; a++) { printf("na =",a); } }
  • 6. Output Executable File: Sample7.COM Compiler Screen:
  • 7. Sample9.C /* SAMPLE9.C: An example program for the C-- Compiler */ int a, b, c; main() { printf("nSAMPLE9.C: A C-- example programn"); a=1; b=20; if (a>=b) { printf("Truenn"); }else { printf("Falsenn"); } while (a<=b) { printf("a =",a, ", "); a++; } printf("nn"); do { printf("a =",a, ", "); a--; } while (a>1); printf("n"); }
  • 8. Output Executable File: Sample9.COM Compiler Screen:
  • 9. Sample20.C /* SAMPLE20.C: An example program for the C-- Compiler */ int a, , b, c; int d; int e, f; main( { printf("nSAMPLE20.C: A C-- example programn"); a=10; b=5; c=a+b*c+20; printf"a=",a; printf("g=" g); printf"c=",c); }
  • 10. Output Executable File: None Compiler Screen:
  • 11. Sample21.C /* SAMPLE21.C: An example program for the C-- Compiler */ int a, , b, c; int d; int e, f; main( { printf("nSAMPLE21.C: A C-- example programn"); b=5; c=a+b*c+20; printf(); printf"a=",a); printf("b=",b); printf("c=",c; }
  • 12. Output Executable File: None Compiler Screen:
  • 13. Sample22.C /* SAMPLE22.C: An example program for the C-- Compiler */ int a, , b, c; int d; int e, f; main( { printf("nSAMPLE22.C: A C-- example programn"); a=10; c=a+b c+20; printf(); printf"a=",a); printf("c=",c; }
  • 14. Output Executable File: None Compiler Screen: