SlideShare a Scribd company logo
Page 1 of 3
Basic Computation & Principles of Computer Programming Lab
Code: CS 291
Practice all the programs,write only the asterisks [*]marked programs in
your lab assignmentcopy.
This documentis available online at https://goo.gl/WYJZmR
Or scan the QR code by any QRcode scanner mobile app andopenthe urlin
browser. File name: CS291_Assignment.docx
Assignment – 1
Fundamental C Programming
1. Program to find area and circumference ofcircle.
2. Program to find the simple interest.
3. Program to converttemperature from degree centigrade to Fahrenheit. [ * ]
4. Program to calculate sum of 5 subjects and find percentage.
5. Program to find gross salary.
6. Program to show swap of two numbers by using third variable.
7. Program to show swap of two numbers without using third variable. [ * ]
8. Program to find greatestin 3 numbers.
If-else, switch-case, conditional operators
9. Program to find that entered year is leap year or not. [ * ]
10. Program to check ifa given Integer is odd or even.
11. Program to check ifa given Integer is Positive or Negative.
12. Program to find a user entered Integer Divisible by 5 and 11 or not.
13. Program to accepttwo Integers and Check if they are Equal
14. Program to use switch statement display Monday to Sunday. [* ]
15. Program to display arithmetic operator using switch case.
16. Program to show the use ofconditional operator (ternary operator or short hand if-else operator).
Loops
17. Program to reverse a given number.
18. Program to display first10 natural no. & their sum.
19. C Program to Calculate the Sum ofOdd & Even Numbers [ * ]
20. C Program to Compute the Sum of Digits in a given Integer
21. Program to print stars Sequence1[* ]
22. Program to print stars Sequence2.
Page 2 of 3
23. Program to print stars Sequence3[* ]
24. Program to print Fibonacci series up to 100. [ * ]
25. Program to find factorial of a number.
26. Program to find whether given no. is a prime no. or not. [ * ]
27. Program to display sum ofseries 1+1/2+1/3+..+l/n.
28. Program to display series and find sum of1+3+5+…+n. [ * ]
29. Program to print a multiplication table of any number.
30. The program illustrates the use ofthe break and continue statement in a C program.
Assignment – 2
Arrays(1D and 2D)
31. Write a program for sorting the elements ofan array in descending order.
32. Program to show sum of 10 elements ofarray & show the average. [ * ]
33. Program to find the maximum no. in an array.
34. Program to display a matrix.
35. Program to find sum (addition or plus) and difference (minus) of two matrices. [ * ]
36. Program to find multiplication of two matrices.
37. Write a program for removing the duplicate elementin an array.
Pointers
38. Program to create, initialize, assign and access a pointer variable.
39. Program to swap two numbers using pointers. [ * ]
40. Program to add two number using pointers.
41. Program to print size ofdifferenttypes ofpointer variables.
42. Program to demonstrate example ofdouble pointer (pointer to pointer).
43. Program to demonstrate example ofarray ofpointers. [ * ]
44. Program to print a string using pointer.
45. Program to countvowels and consonants in a string using pointer.
46. Program to read array elements and print with addresses.
Strings or Character Arrays
47. Program to show input and output ofa string.
48. Program to find whether a string is palindrome or not.
49. Number of Occurrences ofVowels, Consonants, Words, Spaces & Special Characters in a Given Statement. [ * ]
50. Write a program to copy one string into another and countthe number of characters copied.
51. Program to concatenation of strings.
52. Program to illustration of string handling functions, such as strcat, strcmp, strlen,strcpy [ * ]
53. Programs for counting ofcharacters, words and lines in a text.
Page 3 of 3
Assignment – 3
Functions
54. Program to find square of a number using functions.
55. Write a function power that computes x raised to the power y for integers x and y and returns double-type value.
56. Write a program using functions to calculate square and cube ofan entered number
57. Program to swap two numbers using functions. [ * ]
58. Program to show call by value.
59. Program to show call by reference (address).
60. Program to find largestof two numbers using functions.
61. Program to find factorial of a number using recursion. [ * ]
62. Write a program to perform addition and subtraction of numbers with return value offunction.
Command Line Arguments
63. C program to print all arguments given through command line.
64. C program to find sum oftwo numbers using command line arguments. [ * ]
Structures and Unions
65. C program to declare, initialize an union, example ofunion.
66. C program to create, declare and initialize structure.
67. Write a C Program to demonstrated the difference between structure and unions[ * ]
68. C program to read and print an employee's detail (name, id, age,mobile_no) using structure.
69. C program to add two distances in feetand inches using structure.
70. Store Information(name, roll and marks) ofa Student Using Structure[ * ]
71. Store Information of 5 Students Using Structure
File Handling
72. C program to find number of lines and characters in a text file. [ * ]
73. C program to write text(characters) into file and read the text from the File and display it.
74. C program to copy the contents ofa text file to another file
75. C program to copy the contents ofa text file to another file using command line arguments[ * ]
76. C program to append the contents ofa text file to another file
77. C program to convertthe lower case characters of one file to UPPER CASE characters in another file.
78. C program to Reverse the Content of File and Print it.

More Related Content

DOC
Programming qns
Dr.Subha Krishna
 
DOC
Xi practical file
dipanshupatidar3
 
DOC
Md university cmis 102 week 3 hands
eyavagal
 
PPTX
3. user input and some basic problem
Alamgir Hossain
 
PPTX
2. introduction of a c program
Alamgir Hossain
 
PDF
Assignment in java
Mariel Canonicato
 
DOCX
Ankita sharma focp
AnkitaSharma463389
 
DOCX
C programming Lab 1
Zaibi Gondal
 
Programming qns
Dr.Subha Krishna
 
Xi practical file
dipanshupatidar3
 
Md university cmis 102 week 3 hands
eyavagal
 
3. user input and some basic problem
Alamgir Hossain
 
2. introduction of a c program
Alamgir Hossain
 
Assignment in java
Mariel Canonicato
 
Ankita sharma focp
AnkitaSharma463389
 
C programming Lab 1
Zaibi Gondal
 

What's hot (20)

PDF
Mastering Arrays Assignment
Kasun Ranga Wijeweera
 
PPS
C programming session 03
Dushmanta Nath
 
PDF
Arithmetic operator
Md Masudur Rahman
 
PPTX
Function BPK2
Riki Afriansyah
 
PDF
1 Anne complains that defining functions to use in her programs is a lot of ...
hwbloom59
 
PPT
Functions & Procedures [7]
ecko_disasterz
 
PPTX
Exercise6 ch2
IIUM
 
PPTX
Alg II 2-1 Relations and Functions
jtentinger
 
PPS
C programming session 04
Vivek Singh
 
PDF
Pcd201516
sheikhmoidin
 
PPT
Lab 1
emailharmeet
 
PPTX
Functions in c++
Padma Kannan
 
PPT
test(3)arithmetic in c
Jaya Malathy
 
DOCX
Programming fundamentals
Zaibi Gondal
 
PPS
C programming session 04
AjayBahoriya
 
PPTX
For ICT - PPT
MarkIanMarabe2
 
PPT
Pointers operation day2
Bhuvana Gowtham
 
DOC
Lab manualsahu[et&t]
Vivek Kumar Sinha
 
PPTX
Introduction of calculus in programming
Afaq Siddiqui
 
DOCX
Practical no 3
Kshitija Dalvi
 
Mastering Arrays Assignment
Kasun Ranga Wijeweera
 
C programming session 03
Dushmanta Nath
 
Arithmetic operator
Md Masudur Rahman
 
Function BPK2
Riki Afriansyah
 
1 Anne complains that defining functions to use in her programs is a lot of ...
hwbloom59
 
Functions & Procedures [7]
ecko_disasterz
 
Exercise6 ch2
IIUM
 
Alg II 2-1 Relations and Functions
jtentinger
 
C programming session 04
Vivek Singh
 
Pcd201516
sheikhmoidin
 
Functions in c++
Padma Kannan
 
test(3)arithmetic in c
Jaya Malathy
 
Programming fundamentals
Zaibi Gondal
 
C programming session 04
AjayBahoriya
 
For ICT - PPT
MarkIanMarabe2
 
Pointers operation day2
Bhuvana Gowtham
 
Lab manualsahu[et&t]
Vivek Kumar Sinha
 
Introduction of calculus in programming
Afaq Siddiqui
 
Practical no 3
Kshitija Dalvi
 
Ad

Similar to CS291(C Programming) assignment (20)

PDF
C++ Lab Maual.pdf
Thejeswara Reddy
 
PDF
C++ Lab Maual.pdf
ShivamParjapati2
 
PDF
c++ referesher 1.pdf
AnkurSingh656748
 
PDF
best notes in c language
India
 
DOCX
HSc Computer Science Practical Slip for Class 12
Aditi Bhushan
 
DOCX
Important C program of Balagurusamy Book
Abir Hossain
 
PDF
C and Data structure lab manual ECE (2).pdf
janakim15
 
PDF
Simple c-programs
rashmi322
 
DOCX
Best c programs
AbhishekSharma471920
 
PPTX
Unit-IV.pptx
Mehul Desai
 
RTF
Cse cpl manual-2016
Rajendra khatana
 
DOCX
Programming questions
Dr.Subha Krishna
 
DOC
Md university cmis 102 week 4 hands on lab new
scottbrownnn
 
DOC
Md university cmis 102 week 4 hands on lab new
Last7693
 
PPTX
Lecture 3.2.4 C pointer to Structure.pptx
ravi2692kumar
 
DOC
Md university cmis 102 week 4 hands on lab new
eyavagal
 
PPT
01SoftwEng.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
PDF
Programming Fundamental handouts
International Islamic University
 
C++ Lab Maual.pdf
Thejeswara Reddy
 
C++ Lab Maual.pdf
ShivamParjapati2
 
c++ referesher 1.pdf
AnkurSingh656748
 
best notes in c language
India
 
HSc Computer Science Practical Slip for Class 12
Aditi Bhushan
 
Important C program of Balagurusamy Book
Abir Hossain
 
C and Data structure lab manual ECE (2).pdf
janakim15
 
Simple c-programs
rashmi322
 
Best c programs
AbhishekSharma471920
 
Unit-IV.pptx
Mehul Desai
 
Cse cpl manual-2016
Rajendra khatana
 
Programming questions
Dr.Subha Krishna
 
Md university cmis 102 week 4 hands on lab new
scottbrownnn
 
Md university cmis 102 week 4 hands on lab new
Last7693
 
Lecture 3.2.4 C pointer to Structure.pptx
ravi2692kumar
 
Md university cmis 102 week 4 hands on lab new
eyavagal
 
01SoftwEng.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
Programming Fundamental handouts
International Islamic University
 
Ad

More from Kuntal Bhowmick (20)

PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 7 -- abs...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Kuntal Bhowmick
 
PDF
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Kuntal Bhowmick
 
PDF
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Kuntal Bhowmick
 
PPT
1. introduction to E-commerce
Kuntal Bhowmick
 
DOCX
Computer graphics question for exam solved
Kuntal Bhowmick
 
PDF
DBMS and Rdbms fundamental concepts
Kuntal Bhowmick
 
PDF
Java questions for interview
Kuntal Bhowmick
 
PDF
Java Interview Questions
Kuntal Bhowmick
 
PDF
Operating system Interview Questions
Kuntal Bhowmick
 
PDF
Computer Network Interview Questions
Kuntal Bhowmick
 
PDF
C interview questions
Kuntal Bhowmick
 
PDF
C question
Kuntal Bhowmick
 
PDF
Distributed operating systems cs704 a class test
Kuntal Bhowmick
 
DOCX
Cs291 assignment solution
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 7 -- abs...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Kuntal Bhowmick
 
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Kuntal Bhowmick
 
1. introduction to E-commerce
Kuntal Bhowmick
 
Computer graphics question for exam solved
Kuntal Bhowmick
 
DBMS and Rdbms fundamental concepts
Kuntal Bhowmick
 
Java questions for interview
Kuntal Bhowmick
 
Java Interview Questions
Kuntal Bhowmick
 
Operating system Interview Questions
Kuntal Bhowmick
 
Computer Network Interview Questions
Kuntal Bhowmick
 
C interview questions
Kuntal Bhowmick
 
C question
Kuntal Bhowmick
 
Distributed operating systems cs704 a class test
Kuntal Bhowmick
 
Cs291 assignment solution
Kuntal Bhowmick
 

Recently uploaded (20)

PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PPTX
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
PPTX
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PDF
Introduction to Data Science: data science process
ShivarkarSandip
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
easa module 3 funtamental electronics.pptx
tryanothert7
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
Information Retrieval and Extraction - Module 7
premSankar19
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
Introduction to Data Science: data science process
ShivarkarSandip
 

CS291(C Programming) assignment

  • 1. Page 1 of 3 Basic Computation & Principles of Computer Programming Lab Code: CS 291 Practice all the programs,write only the asterisks [*]marked programs in your lab assignmentcopy. This documentis available online at https://goo.gl/WYJZmR Or scan the QR code by any QRcode scanner mobile app andopenthe urlin browser. File name: CS291_Assignment.docx Assignment – 1 Fundamental C Programming 1. Program to find area and circumference ofcircle. 2. Program to find the simple interest. 3. Program to converttemperature from degree centigrade to Fahrenheit. [ * ] 4. Program to calculate sum of 5 subjects and find percentage. 5. Program to find gross salary. 6. Program to show swap of two numbers by using third variable. 7. Program to show swap of two numbers without using third variable. [ * ] 8. Program to find greatestin 3 numbers. If-else, switch-case, conditional operators 9. Program to find that entered year is leap year or not. [ * ] 10. Program to check ifa given Integer is odd or even. 11. Program to check ifa given Integer is Positive or Negative. 12. Program to find a user entered Integer Divisible by 5 and 11 or not. 13. Program to accepttwo Integers and Check if they are Equal 14. Program to use switch statement display Monday to Sunday. [* ] 15. Program to display arithmetic operator using switch case. 16. Program to show the use ofconditional operator (ternary operator or short hand if-else operator). Loops 17. Program to reverse a given number. 18. Program to display first10 natural no. & their sum. 19. C Program to Calculate the Sum ofOdd & Even Numbers [ * ] 20. C Program to Compute the Sum of Digits in a given Integer 21. Program to print stars Sequence1[* ] 22. Program to print stars Sequence2.
  • 2. Page 2 of 3 23. Program to print stars Sequence3[* ] 24. Program to print Fibonacci series up to 100. [ * ] 25. Program to find factorial of a number. 26. Program to find whether given no. is a prime no. or not. [ * ] 27. Program to display sum ofseries 1+1/2+1/3+..+l/n. 28. Program to display series and find sum of1+3+5+…+n. [ * ] 29. Program to print a multiplication table of any number. 30. The program illustrates the use ofthe break and continue statement in a C program. Assignment – 2 Arrays(1D and 2D) 31. Write a program for sorting the elements ofan array in descending order. 32. Program to show sum of 10 elements ofarray & show the average. [ * ] 33. Program to find the maximum no. in an array. 34. Program to display a matrix. 35. Program to find sum (addition or plus) and difference (minus) of two matrices. [ * ] 36. Program to find multiplication of two matrices. 37. Write a program for removing the duplicate elementin an array. Pointers 38. Program to create, initialize, assign and access a pointer variable. 39. Program to swap two numbers using pointers. [ * ] 40. Program to add two number using pointers. 41. Program to print size ofdifferenttypes ofpointer variables. 42. Program to demonstrate example ofdouble pointer (pointer to pointer). 43. Program to demonstrate example ofarray ofpointers. [ * ] 44. Program to print a string using pointer. 45. Program to countvowels and consonants in a string using pointer. 46. Program to read array elements and print with addresses. Strings or Character Arrays 47. Program to show input and output ofa string. 48. Program to find whether a string is palindrome or not. 49. Number of Occurrences ofVowels, Consonants, Words, Spaces & Special Characters in a Given Statement. [ * ] 50. Write a program to copy one string into another and countthe number of characters copied. 51. Program to concatenation of strings. 52. Program to illustration of string handling functions, such as strcat, strcmp, strlen,strcpy [ * ] 53. Programs for counting ofcharacters, words and lines in a text.
  • 3. Page 3 of 3 Assignment – 3 Functions 54. Program to find square of a number using functions. 55. Write a function power that computes x raised to the power y for integers x and y and returns double-type value. 56. Write a program using functions to calculate square and cube ofan entered number 57. Program to swap two numbers using functions. [ * ] 58. Program to show call by value. 59. Program to show call by reference (address). 60. Program to find largestof two numbers using functions. 61. Program to find factorial of a number using recursion. [ * ] 62. Write a program to perform addition and subtraction of numbers with return value offunction. Command Line Arguments 63. C program to print all arguments given through command line. 64. C program to find sum oftwo numbers using command line arguments. [ * ] Structures and Unions 65. C program to declare, initialize an union, example ofunion. 66. C program to create, declare and initialize structure. 67. Write a C Program to demonstrated the difference between structure and unions[ * ] 68. C program to read and print an employee's detail (name, id, age,mobile_no) using structure. 69. C program to add two distances in feetand inches using structure. 70. Store Information(name, roll and marks) ofa Student Using Structure[ * ] 71. Store Information of 5 Students Using Structure File Handling 72. C program to find number of lines and characters in a text file. [ * ] 73. C program to write text(characters) into file and read the text from the File and display it. 74. C program to copy the contents ofa text file to another file 75. C program to copy the contents ofa text file to another file using command line arguments[ * ] 76. C program to append the contents ofa text file to another file 77. C program to convertthe lower case characters of one file to UPPER CASE characters in another file. 78. C program to Reverse the Content of File and Print it.