Giter Site home page Giter Site logo

cppbootcamp's Introduction

YACC bootcamp session 2

Loops

while

for

Questions

  1. Print first n natural numbers
  2. Print first n odd/even numbers
  3. Calculate n!
  4. Calculate the nth fibonacci number
  5. The idea of t testcases for a cp problem
  6. Take input till sum exceeds 100, then return how many inputs have been taken

Arrays

  1. Find min, max and average of n input numbers
  2. Find all fibonacci numbers upto n
  3. For n inputs between 1 and 30, find frequency of each number

Functions

Re-implement the previous questions using functions

  1. Find the second and third maximum element in an array of positive integers

Recursion

  1. Calculate n! using recursion
  2. Calculate the nth fibonacci number using recursion

Strings

  1. Draw an n sided pyramid using '*'s
  2. Write a program that reverses an input string

Pointers

Only overview, and 1 pass by reference function

GCC

C/C++ code is compiled using GCC in Linux(GNU) and MinGW in Windows
gcc is used to compile C and g++ to compile C++
Basic gcc commands

$ g++ [name of file] -o [name of output file]

note: -o [output name of file] is not neccessary. By default it compiles to a file named a.out.

To run the compiled file, simply do

$ ./a.out

or, for file name,

$ ./[name of output file]

cppbootcamp's People

Contributors

unniisme avatar

Stargazers

 avatar Shri Havish Aele avatar

Watchers

 avatar

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.