Preview

introduction

Good Essays
Open Document
Open Document
293 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
introduction
TMC1414
Tutorial 2
1. What are the contents of following header files
a.
b.
c.
d.
2. Explain the basic data types used in c with their data range.
3. Identify the following identifiers are valid or invalid. If invalid explain why?
(a) Date12/2/2012
(b) _net
(c) $Twenty
(d) false
(e) 2Me
4. Identify and correct the errors in each of the following statements (Note: there may be more than one error per statement):
a) scanf( "d", value );
b) printf( "The product of %d and %d is %d"\n, x, y );
c) firstNumber + secondNumber = sumOfNumbers
d) if ( number => largest ) largest == number;
e) */ Program to determine the largest of three integers /*
f) Scanf( "%d", anInteger );
g) printf( "Remainder of %d divided by %d is\n", x, y, x % y );
h) if ( x = y ); printf( %d is equal to %d\n", x, y );
i) print( "The sum is %d\n," x + y );
j) Printf( "The value you entered is: %d\n, &value );
5. Write a single C statement or line that accomplishes each of the following:
a) Print the message “Enter two numbers.”
b) Assign the product of variables b and c to variable a.
c) State that a program performs a sample payroll calculation (i.e., use text that helps to document a program).
d) Input three integer values from the keyboard and place these values in integer variables a, b and c.
6. What, if anything, prints when each of the following statements is performed? If nothing prints, then answer “Nothing.” Assume x = 2 and y = 3.

a) printf( "%d", x );
b) printf( "%d", x + x );
c) printf( "x=" );
d) printf( "x=%d", x );
e) printf( "%d = %d", x + y, y + x );
f) z = x + y;
g) scanf( "%d%d", &x, &y );
h) // printf( "x + y = %d", x + y );
i) printf( "\n" );

You May Also Find These Documents Helpful

  • Better Essays

    introduction

    • 5346 Words
    • 41 Pages

    The aim of this experiment is to understand the non-linear aerodynamic characteristic of a slender wing-body (rocket shaped) by installing the slender wing-body inside the wing tunnel and run the wing tunnel at subsonic speed and changing the incidence angle of the slender from -14 to 28 degrees over period of time and record the lift and induced drag readings from a computer which is connected to the wind tunnel.…

    • 5346 Words
    • 41 Pages
    Better Essays
  • Good Essays

    Intro

    • 390 Words
    • 2 Pages

    This laboratory is based on a series of famous experiments that were conducted in the 1960’s along the rocky shore of Washington state, in the northwestern United States…The nine species in this laboratory’s simulated rocky intertidal area include three different algae (including one you may have eaten in a Japanese restaurant); three stationary (or “sessile”) filter-feeders; and three mobile consumers (Keystone Predator Student Workbook). In this simulation there are nine different species. The Nori Seaweed, Black Pine, Coral Weed, Mussels, Acorn Barnacles, Gooseneck Barnacles, Whelk, Chiton, and Starfish. The Nori seaweed, Black Pine, and Coral Weed are all algae, which means they live in damp environments and are plant like and have chlorophyll. Having chlorophyll they make their own food through photosynthesis, the fact they can make their own food makes them autotrophs or producers, and are the lowest on the trophic level. The Acorn barnacles, mussels, and gooseneck barnacles are the filter feeders of this environment they do not move. They are the herbivores of this environment and the primary consumers on the trophic level. The whelk, chiton, and starfish are the only mobile species in this environment. Also they are the only carnivores in the environment and are secondary consumers on the trophic level.…

    • 390 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Introduction

    • 2495 Words
    • 13 Pages

    You must be registered for both lecture (Biol 1406 Lecture) and lab (Biol 1406 Lab). The lecture portion comprises 70% of the final course grade. The lab portion of the course comprises 30% of the final course grade. You must be registered for lab on the Southeast Campus.…

    • 2495 Words
    • 13 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Week1 Exercises

    • 499 Words
    • 2 Pages

    f) Swap the contents of the in variables x and y. (Declare additional variables, if necessary.)…

    • 499 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Show all the possible interleavings of the execution of preceding two processes (Show this by giving execution “traces” in terms of the atomic statements)…

    • 810 Words
    • 4 Pages
    Good Essays
  • Good Essays

    introduction

    • 609 Words
    • 3 Pages

    Masco is an American company founded in December of 1929. The company originally began as a manufacturer of machined automotive parts but over a 60 year period successfully grew into a company that sold a broad portfolio of Building and Home Improvement products, Oil-field and Related Products, and Transportation-related products. The company had a reputation for innovation and has developed of portfolio of successful brands.…

    • 609 Words
    • 3 Pages
    Good Essays
  • Good Essays

    String and T/f

    • 2717 Words
    • 28 Pages

    10. Assume that x, y, and temp are Integer variables. Which of the following lines of code swaps…

    • 2717 Words
    • 28 Pages
    Good Essays
  • Satisfactory Essays

    Odd-Even Program C++

    • 311 Words
    • 2 Pages

    * Enter the number. Make the coding that if the entered number is ODD then display the message the “Number is odd”, else display that “Number is even”.…

    • 311 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    slips

    • 5191 Words
    • 38 Pages

    B) Write a menu driven program in ‘C’ that shows the working of a library. The…

    • 5191 Words
    • 38 Pages
    Good Essays
  • Good Essays

    Introduction

    • 250 Words
    • 1 Page

    Product development, as well as market research, in food industry is important. Product development is the phase which the organization determines if it is technically feasible to produce the product and if it can be produced at costs low enough to make the final price reasonable (Ferrell, 2010). As a survival means in a market, new product development can be used as a competitive weapon in the marketplace (Annacchino, 2003).…

    • 250 Words
    • 1 Page
    Good Essays
  • Satisfactory Essays

    introduction paper

    • 350 Words
    • 2 Pages

    What is social welfare/social services? They are services/assistance provided by the government to help those in need. They help benefit the community, including things such as education and housing. The goal of social welfare is to fulfill the social, financial, health, and recreational requirements of all individuals in a society. Social welfare seeks to enhance the social functioning of all age groups, both rich and poor. Recipients of social welfare vary throughout the world. Examples of social welfare program and services are foster care, head start, probation, financial assistance programs for low income parents, suicide counseling, and also public housing projects. They also include, parentless children, people who are addicted to alcohol or drugs, veterans, and juveniles. Agencies that provide social services are public agencies, private not-for-profit, private profit making agencies, self-help agencies, and individual professionals/independent practice. Delivering social services can sometimes be one on one counseling with an individual or family or even providing housing for a low income family, and it comes from the different agencies that help those in need. It may affect those who receive and sometimes people are delighted to receive these services. Some people may be embarrassed and don’t want anybody to know what they’re going through. On the other hand, you have some that will keep it a secret for as long as they can. There are many social issues that these agencies are able to help with. Social issues may range from affordable housing, drugs, education, rehabilitation, and also employment. Some more social issues may include depression, family life, financial needs, and also people with physical or mental disabilities. I would like to fit myself in any service agency that helps out kids starting in middle school. I also plan to accomplish my goal of becoming a social service provider by first, finishing school, and then start…

    • 350 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Cse Cycle Sheet Programs

    • 384 Words
    • 2 Pages

    i)Various Data types ii)Input, Output(scanf,printf) i)Assignment Operator ii)Arithmetic Operator i)Arithmetic Operators ii)Decimal Display i)Expression Solving ii)Electronics Concepts…

    • 384 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Ebusiness

    • 621 Words
    • 3 Pages

    Provide the pseudocode for a program that takes in a whole number user input, and tells them…

    • 621 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    INTRODUCTION

    • 819 Words
    • 3 Pages

    They slowly started establishing industries with the consent of the concerned local rulers. Some of the local kingdoms, tricked by friendly conduct and their advancement in science and technology, submitted to the Europeans and surrendered their sovereignty. This process of gaining the sovereignty was speeded up when the Carnatic war came to an end. The British took firm hold of the Indian soil after the Queen’s Proclamation.…

    • 819 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Java Tutorial Questions

    • 3113 Words
    • 13 Pages

    6. Are the conversions shown below valid or invalid? If valid, what is the result.…

    • 3113 Words
    • 13 Pages
    Good Essays