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

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
 

Similar to CS291(C Programming) assignment (20)

DOC
Course Breakup Plan- C
swatisinghal
 
DOC
C-programs
SSGMCE SHEGAON
 
DOCX
Best c programs
AbhishekSharma471920
 
PDF
Simple c-programs
rashmi322
 
DOCX
B.Com 1year Lab programs
Prasadu Peddi
 
DOCX
C programs
vijaybandi36
 
PDF
Subject:Programming in C - Lab Programmes
vasukir11
 
DOC
Coursebreakup
PCTE
 
DOC
Coursebreakup
PCTE
 
PPTX
Najmul
Najmul Ashik
 
PPTX
Team-7 SP.pptxdfghjksdfgduytredfghjkjhgffghj
bayazidalom983
 
PDF
best notes in c language
India
 
DOCX
C_Lab Manual_Part A.docx
Pandiya Rajan
 
PDF
Assignment 1 for 2nd sem
home
 
DOC
Coursebreakup
PCTE
 
PPTX
Fundamental programming Nota Topic 2.pptx
UmmuNazieha
 
DOC
'C' language notes (a.p)
Ashishchinu
 
DOCX
C file
simarsimmygrewal
 
DOC
Datastructure notes
Srikanth
 
PDF
PCA-2 Programming and Solving 2nd Sem.pdf
Ashutoshprasad27
 
Course Breakup Plan- C
swatisinghal
 
C-programs
SSGMCE SHEGAON
 
Best c programs
AbhishekSharma471920
 
Simple c-programs
rashmi322
 
B.Com 1year Lab programs
Prasadu Peddi
 
C programs
vijaybandi36
 
Subject:Programming in C - Lab Programmes
vasukir11
 
Coursebreakup
PCTE
 
Coursebreakup
PCTE
 
Najmul
Najmul Ashik
 
Team-7 SP.pptxdfghjksdfgduytredfghjkjhgffghj
bayazidalom983
 
best notes in c language
India
 
C_Lab Manual_Part A.docx
Pandiya Rajan
 
Assignment 1 for 2nd sem
home
 
Coursebreakup
PCTE
 
Fundamental programming Nota Topic 2.pptx
UmmuNazieha
 
'C' language notes (a.p)
Ashishchinu
 
Datastructure notes
Srikanth
 
PCA-2 Programming and Solving 2nd Sem.pdf
Ashutoshprasad27
 
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
 
Ad

Recently uploaded (20)

PPTX
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
PPT
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
PDF
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
PDF
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
PPTX
Alan Turing - life and importance for all of us now
Pedro Concejero
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
PDF
this idjfk sgfdhgdhgdbhgbgrbdrwhrgbbhtgdt
WaleedAziz7
 
PPTX
Fundamentals of Quantitative Design and Analysis.pptx
aliali240367
 
PDF
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
PDF
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PDF
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
PPTX
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
PDF
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
PPTX
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
PPTX
darshai cross section and river section analysis
muk7971
 
PDF
Bachelor of information technology syll
SudarsanAssistantPro
 
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
Alan Turing - life and importance for all of us now
Pedro Concejero
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
this idjfk sgfdhgdhgdbhgbgrbdrwhrgbbhtgdt
WaleedAziz7
 
Fundamentals of Quantitative Design and Analysis.pptx
aliali240367
 
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
darshai cross section and river section analysis
muk7971
 
Bachelor of information technology syll
SudarsanAssistantPro
 

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.