Preview

Empower the Masses

Powerful Essays
Open Document
Open Document
827 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Empower the Masses
The structure of C program

[pic]

C is made up entirely of building blocks which have a particular ‘shape’ or form .A program is made up of functions, functions are made up of statements and declarations surrounded by curly braces { } .One and only one of these functions in the program must have the name main(). This function is always the starting point of a C program . The parentheses ‘()’ which follow the name of the function must be included even though they apparently serve no purpose at this stage.

’m

The Headers

#include header.h
At the top of a program file. For instance:
#include "myheader.h"
Includes a personal header file which is in the current directory Or
#include
includes a file which lies in a standard directory like ‘/usr/include’.
The #include directive is actually a command to the C preprocessor .

Now i will tell you about printf function .

The printf() function

• What is full form of printf function? - Print format function

• What is print format (printf) ? - It refers to a control parameter used by a class of functions typically associated with some types of programming languages. The format string specifies a method for rendering an arbitrary number of varied data type parameter(s) into a string. In simple words we can say It provides an superbly versatile way of printing text.

• How to print a normal string ? - printf ("..some string...");

• How to print a Integer ? - Here we cant use the same command we used in printing the text, we have to use control sequence - %d . The variable someinteger is printed instead of ‘%d’ . Below you see the command .

printf ("Integer = %d",someinteger);

Here is a small program with its output showing the example of printf function .

|| Download Turbo C ||
|| How to install Turbo C ||

/***********************************************************/
/* any

You May Also Find These Documents Helpful

  • Satisfactory Essays

    cout << "You are in factorial program of C++. Please enter a +ve integer:- ";…

    • 426 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Nt1310 Unit 4

    • 3614 Words
    • 15 Pages

    The program is trying to collect the value of a "void" function into an integer variable.…

    • 3614 Words
    • 15 Pages
    Better Essays
  • Satisfactory Essays

    In 1970 C programing was created by Dennis Richie and ken Thompson was made to create portability in UNIX…

    • 388 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    System.out.println("i = " + i + " f = " + f + " d = " + d);…

    • 2338 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    22.Write a program to read a sequence of characters and display them in reverse order on the next line. Page: 144…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    C Is difficult, because the control flow is out of the hands of the application programmer…

    • 1508 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    The so-called Era of Good Feelings was never entirely tranquil, but the illusion of national consensus was shattered by the panic of 1819 and the Missouri Compromise of 1820. Vigorous political conflict, once feared, came to be celebrated as necessary for the health of democracy. The American political landscape of 1824 was similar, in its broad outlines, to that of 1796. By 1840 it would be almost unrecognizable.…

    • 4003 Words
    • 17 Pages
    Powerful Essays
  • Good Essays

    Output will consist of a series of lines, one for each line of the input. Each line will consist of the position of the string in its…

    • 525 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    What value is assigned to the String variable strSecond when the following code is executes?…

    • 2759 Words
    • 44 Pages
    Powerful Essays
  • Satisfactory Essays

    h. The set of all strings consisting of the keyword begin, followed by one or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.…

    • 470 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Programming Homework

    • 366 Words
    • 2 Pages

    The variables in this program will be declared are num_1, num_2 and will be used as integers.…

    • 366 Words
    • 2 Pages
    Good Essays
  • Good Essays

    A Nationwide Revolution

    • 1615 Words
    • 7 Pages

    In 1905 the massacre of innocent people during a peaceful protest outside the winter palace in St Petersburg sparked the start of a nationwide revolution. This mass murder of the innocent protestors became known as ‘Bloody Sunday’. During the revolution strikes occurred across the nation involving more than 400,000 people, peasants attacked and raided the homes of their landlords and the Tsar’s uncle, the Grand Duke Sergei, was assassinated. Although Bloody Sunday was the immediate reason for the revolution, there were several causes which had caused long term grievances towards the Tsarist regime among the population of Russia leading up to 1905. These include the developments in the countryside and the lives of the peasants, the treatment of the inner-city working class and ethnic minorities, the repression and growth of the political opposition and the impact of the Russo Japanese war. Although all these factors contributed to the initiation of a revolution in Russia, I believe that the attitudes towards and treatment of the working class and the peasants was the most prominent reason for the uprising in 1905.…

    • 1615 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Mass Democracy

    • 1218 Words
    • 5 Pages

    The years between 1820 and 1840 were filled with history altering social and political changes which continue to affect our society today. These changes all revolve around the new concept of mass democracy, in which the common man or farmer controlled the vote and the way things were ran in government. This was made possible by the new reduced voting restrictions that gave all white males the right to vote, and not just wealthy land owning white males. Mass democracy’s formation led to new campaigning strategies for politicians, newly formed political parties which played a necessary part in the use of the nation’s checks and balance system for political power, and new ideas for the betterment of the country. Leaders such as John Marshall, Andrew Jackson, Henry Clay, and William Henry Harrison had to decide whether to adapt to the constantly changed political ideas of the majority, or continue instituting the federalist views laid out by their forefathers, despite their unpopularity. Thanks to this adaption to change, these men were able to recognize the social and political changes occurring and give the country mass democracy.…

    • 1218 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Number System

    • 468 Words
    • 2 Pages

    For most purposes, however, binary values are converted to or from the equivalent decimal values for presentation to or input from humans; computer programs express literals in decimal by default. (123.1, for example, are written as such in a computer program, even though many computer languages are unable to encode that number precisely.)…

    • 468 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Python Tutoral

    • 2043 Words
    • 9 Pages

    A Python identifier is a name used to identify a variable, function, class, module, or other object. An identifier…

    • 2043 Words
    • 9 Pages
    Powerful Essays