Git Product home page Git Product logo

c-lab-report's Introduction

Comprehensive C Programming Lab Report Repository - By jrTilak

Description

Welcome to the Comprehensive C Programming Lab Report Repository, curated by jrTilak. This repository is designed to provide a comprehensive collection of solutions for the C Programming lab assignments, covering various topics and concepts. Whether you are a student studying at Tribhuvan University's Institute of Engineering or an aspiring programmer, this repository is a valuable resource for enhancing your understanding and practical skills in C programming.

Each lab sheet is meticulously prepared and includes a range of exercises and problems for you to solve. The solutions provided in this repository encompass the complete set of requirements, including code samples, lab reports in PDF and DOCX formats with flowchart and algorithm, guides, and detailed explanations. With these resources, you can gain a deeper understanding of each topic and hone your programming skills.


See Also:

All questions covered in this repo.


The repository follows a structured approach, covering a wide range of topics, including:

  1. C Programming Fundamentals
  2. Data Types, Constants, Operators, and Expressions
  3. Selective Structures (Branching)
  4. Unformatted and Formatted Input/Output
  5. Loops
  6. Functions
  7. Arrays
  8. Pointers
  9. Structures
  10. Strings
  11. File Handling

Whether you are starting from scratch or looking to strengthen your knowledge in specific areas, this repository is an invaluable asset. Each lab sheet includes a cover page, title, objectives, algorithm, flowchart, code snippets, program outputs, and a comprehensive discussion and conclusion section. The provided lab sheets adhere to the standards set by the Department of Electronics and Computer Engineering.

If you have any questions, suggestions, or feedback, feel free to reach out to jrTilak, the creator of this repository, at [email protected]. jrTilak is dedicated to ensuring the quality and usefulness of the solutions, and your input is highly valued.

By utilizing this repository, you can enhance your understanding of C programming concepts, improve your problem-solving abilities, and prepare for your final examinations. Explore the lab sheets, delve into the code samples, and unravel the intricacies of C programming with this comprehensive repository.

Note: This repository is not affiliated with Tribhuvan University or the Institute of Engineering. It is an independent initiative by jrTilak to support C programming learners.



List of all questions covered in this repo.

  1. WAP to display hello world.
  2. WAP to display your name, roll number and address.
  3. WAP to add two integer variables and print sum.
  4. WAP to multiply two integer variables and print product.
  5. WAP to calculate and display the simple interest.
  6. WAP to calculate the area of the circle.


  1. WAP to declare integer, float and character variable. Initialize them with certain value and print those values. Also display the size of variables.
  2. WAP to swap the values of the variable with and without using third variable.
  3. WAP to calculate the area and volume of a cylinder using pre-processor directive for value of PI.
  4. WAP to input two numbers from user and display the minimum using conditional operator.
  5. WAP to display whether a number is even or odd using conditional operator
  6. What are the output of the following programs:
     #include <stdio.h> 
     int main()
     {
         int a = 5, b = 9;
         printf("a = %d, b = %d\n", a, b); 
         printf("a&b = %d\n", a & b); 
         printf("a|b = %d\n", a | b); 
         printf("a^b = %d\n", a ^ b); 
         printf("~a = %d\n", ~a);
         printf("(b<<2)+(a<<1) = %d\n",(b<<2)+(a<<1));
         printf("(b>>1)+(a>>1) = %d\n",(b>>1)+(a>>1)); 
         return 0;
     }


  1. WAP to check whether a number is negative, positive or zero.
  2. WAP to find maximum between three numbers entered by the user.
  3. WAP to input a character from the user and check whether the character is vowel or consonant.
  4. WAP to input a character from the user and check whether the character is Alphabet or not. If the character is Alphabet then show whether it is uppercase or lowercase.
  5. WAP to check whether the year entered by the user is leap year or not.
  6. WAP to check whether the number entered by the user is divisible by 5 and 11 or not.
  7. WAP to find the all the roots of a quadratic equation.
  8. WAP to input two numbers and operator among [ + , - ,* , / ]. If user enters + then the program should perform the addition of the number and display the sum. If user enters – then the program should perform subtraction of number and display the difference and so on for * and /.
  9. WAP in C to input marks of five subjects C-programming, Physics, Maths, Applied Mechanics and Basic electrical. Display whether the student passed or failed. Take F.M=100 and P.M.=40 For passed students calculate percentage and grade according to following:Percentage >= 90% : A Percentage >=80% : B Percentage >= 70% : C Percentage >= 60% : D Percentage >= 40% : E
  10. WAP to input a number from user. If user enters a number less than or equal to zero then program should just display the number. If user enters 1 the program should display output as neither prime nor composite, if user enters 2 the program should display output as smallest and only even prime number. If user enters any number greater than 2 the program should check whether the number is prime or not, also if the number is not prime the program should display whether it is even or odd.


  1. WAP to get your name, address and display using unformatted I/O.
  2. WAP to get a character form the user using unformatted I/O and display the ASCII value of the entered character.
  3. WAP to display the output as (take a=15, b=20.43, c=35):
    A =     15|15    |    15|15    |    15|15    |    15|15    |    15|15    |
    B =  20.43|20.43 | 20.43|20.43 | 20.43|20.43 | 20.43|20.43 | 20.43|20.43 |
    C =     35|35    |    35|35    |    35|35    |    35|35    |    35|35    |
    
  4. WAP to display the output as below using formatted I/O [take char a[]=”I Love Nepal”].
    I
    I L
    I Lo
    I Lov
    I Love
    I Love N
    I Love Ne
    I Love Nep
    I Love Nepa
    I Love Nepal
    


  1. WAP to read 10 numbers from user and find their sum and average.
  2. WAP to display the multiplication table of integer given by the user.
  3. WAP to input two integer values from the user and print the even number between the range of integers. Also count the even number and display the count as well [Hint: if user enters 10 and 100. The program should print and count even numbers between 10 and 100].
  4. WAP to display sum of series: 1 + 1/2 + 1/3 + 1/4 + 1/5 ... 1/n
  5. WAP to display sum of series: 1 + 1/2! + 1/3! + 1/4! + 1/5! ... 1/n!
  6. WAP to display sum of series: x + x2/2! + x3/3! + x4/4! + x5/5! ... xn/n!
  7. WAP to find the value cos(x) without using cos(x) library function.
  8. WAP to display weather a number is Armstrong or not.
  9. WAP to display the first n terms of Fibonacci series.
  10. WAP to display the number in reverse order.
  11. WAP to check whether a number is a palindrome or not.
  12. WAP to find HCF and LCM of two numbers.
  13. WAP to print the following patterns
Pattern 1: 
1 
1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 

Pattern 2: 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 
1 

Pattern 3: 
    *
   ***
  *****
 *******
*********

Pattern 4: 
1 
2 3 
4 5 6 
7 8 9 10 
11 12 13 14 15 

Pattern 5: 
1 2 3 4 5 4 3 2 1 
  1 2 3 4 3 2 1 
    1 2 3 2 1 
      1 2 1 
        1

Pattern 6: 
5 4 3 2 1 
5 4 3 2
5 4 3
5 4
5

c-lab-report's People

Contributors

jrtilak avatar

Watchers

 avatar  avatar

c-lab-report's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.