Posts

Showing posts with the label C

Fibonacci series in C programming

Image
Fibonacci series in C programming Fibonacci series in c programming using loops and recursion. You can print as many terms of series as your required. The number of the sequence is known as Fibonacci numbers in c programming. The series start as 0,1,1,2,3,5,8….,. Except for the first two terms of the sequence every other terms is sum of previous two terms for example 5=3+2(addition of 3 and 2). Fibonacci series Program example in C  #include <stdio.h> int main() {  int n, first = 0, second = 1, next, a;   printf("Enter the number of terms\n");   scanf("%d", &n);  printf("First %d terms of Fibonacci series are:\n", n);  for (a = 0; a < n; a++)  {  if (a <= 1)   next = a;   else   {  next = first + second; first = second; second = next;   }   printf("%d\n", next);   }  return 0;  } Fibonacci series P...

C++ Operator Precedence

C++ Operator Precedence The order in which different type of operators in an expression are evaluated is known as operator precedence. C++ operator precedence is also known as hierarchy of operators. Each operator has its own precedence level. If an expression contains different types of operators, the operators with higher precedence are evaluated before the operators with lower precedence. The order of precedence in C++ Language is as follows: Any expression given in parentheses is evaluated first. Then Multiplication * and division / Operators are evaluated. Then plush + and minus – operators are evaluated. In case of parentheses within parentheses, the expression of the inner parentheses will be evaluated first. Example: The expression 10*(24/(5-2))+13 is evaluated in the following order: First of all the expression 5-2 will be evaluated. It gives a value 3. Secondly, 24 will be divided by the result of last line i.e. 24/3 giving value 8. Thirdly, 10 will...

Difference Between Compiler and interpreter and assembler

Image
Difference Between Compiler and interpreter and assembler Language Processor Computer understands only machine language. A program writer in high level or assembly language cannot be run on a computer directly. It must be converted into machine language before execution. Language processor or translator is a   software that converts these programs into machine language. Every computer language has its own translators. Different Types of language processors are as follows.\ Difference Between Compiler and interpreter and assembler Compiler A compiler is a program that converts the instruction of a high level language into machine language as a whole. A program written in high level language is called source program. Compiler converts source program into machine code know as object Program. The compiler checks each statement in the source program and generates machine instructions. Compiler also checks syntax errors in the program. A source program containing ...

Borland C++ Compiler Download Free

Image
Download Borland C++ Compiler In this article i will guide you how to download and install Borland C++ compiler.  Borland C++ compiler is used to compile both c and c++ programs on windows and other platforms. Borland C++ compiler was lunched after turbo C++ compiler and has better features and efficiency. But the worst thing is the latest version of Borland C++ does not come up with the IDE, so I will mention link of IDE  C Free . So with  C Free we can write and run programs easily. In this Post I am sharing the link to download Borland C++ compiler 5.5 and the steps to install and make it work Borland C and C++ compiler Step to Download Borland C++ Compiler and IDE: 1 Click on below link and Download the Borland C++ compiler zip file                               Download here 2    2 Extract the downloaded file you have two folder after Extract 3...

Best IDE for and C and C++ programming languages

Image
Many programming languages come with a lot of promise but they are dead early. However, there are some legends that emerged from the first generation of computers and still very popular and relevant. C and C++ programming languages are gem and very popular across applications and systems all over the world. Their powerful set of features and good security, these programming languages are very popular among programmers. C language Compiler IDE Good IDE Help programmers to create error-free and maintainable application or any kind of website. Best IDE is the one that makes you most productive. Best compilers for C and C++ programming. There are many compilers for C and C++ programming some of them are: Code Block Code block is open source and free compiler for both c and c++ programming. Code block is lightest and the best C and C++ IDE among the available options in the market.   It’s a cross platform you can add various kinds of plugin to it and make it more effici...

Most Asked C Programming Interview Question

Image
  In this article I am going to discuss fundamentals of see related interview questions and answers. C programming Interview Questions 1-     What is C programming language and why we use it?   C there is a high level programming language it is developed by Dennis Ritchie in 1970s at Bell lab. It is used to develop system software and application software. 2-     Why we use main function in every C program? Main is pre-declared and user defined function it is, compulsory to use this function in every C program because execution of the program begins with main. 3-     What is the meaning of header file name, some header files? Header files contain declarations of predefined functions. We can use any number of header files in our programs as per the requirement of predefined functions. Some header files are   stdio.h for neurotic, math.h     string.dot ,and graphics dot.h.  4-     What is ...

Lesson No. 06 Introduction to Writing Functions In C

Image
Function In C programming Lesson No.  06:   Introduction to Writing Functions In C Now for the part we've all been waiting for, the basis of doing everything in C, functions. We've talked briefly about what functions are, how they are used, how we've even made some function calls, etc. Now it's time to really dive in and get a concrete understanding of functions and how to write our own. Fair warning, some of this will be repeat, so bare with me, I want to make absolutely sure everything gets covered. Functions IN C Programming What is a Function? In simple terms, a function is a piece of code that has other smaller bits of code clumped together to perform a certain task or set of tasks. Once again, things like printf, getchar, and main are functions themselves so you've seen what they can do. Now let's talk about the purpose of functions. Imagine we had a program that asked a question very regularly to a user and gathered input from them. It wou...

Uses of C Programming Language

Image
Uses of C Programming C is a powerful,portable and elegantly structured programming language. since C combine the feature of high level language with element of assembler, it is suitable for both systems as well application programming. It is undoubtedly the most widely used general-purpose language in operating system development.Its influence is evident in almost all modern programming language.since its standardization in 1989 ,C has undergoes a series of change and improvement in order to enhance the usefulness of the language ,the version that incorporates in order to enhance the usefulness of the language. The version that incorporates the new feature is now referred to as C99 It is the most popular computer language today because it is structured,high level,machine independent language.It allows software developer to develop program without worring about the hardware performs where they will be implemented. C is a low level Programming Language...