BrainDump
  Home arrow BrainDump arrow Page 4 - C: For Beginners
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

C: For Beginners
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 6
    2008-01-28

    Table of Contents:
  • C: For Beginners
  • Insert Obligatory First Program Here
  • Working with Numbers
  • Putting on the Puts()

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    C: For Beginners - Putting on the Puts()


    (Page 4 of 4 )

    Another way to print strings to the screen is using the puts() function. You can use puts() when you do not plan on using placeholders:


    #include <stdio.h>

    int main (void)

    {

    puts("Hello, pretty lady!");

    return 0;

    }

    This prints out:

      Hello, pretty lady!

    Note that puts() automatically places a new line in your code, whether you like it or not. What a jerk. There is also a function called fputs, which works in a similar manner, but it is a little beyond the scope of this article, and to be honest, I would typically just stick with the printf() function.

    Printing Is Fun Until Someone Loses Your Eyes

    Printing is all fun and good and is probably the most used function in all of C, but wouldn't you like to do more than blabber at the user all day? I mean, I like to do that, but I am a writer. You, yer just a programmer. You let your programs interact with humans so you don't have to go out in the sunlight and get all burned up by that big yellow ball of heat someone told you was called "the sun."

    Haha! I tricked you! You thought I was going to teach you how to do more than print, but I was merely Jedi mind tricking you to come back and read my next article, where I will discuss getting input from the user and working with variables to store information.

    So come back. What else have you got to do?

    Till then...


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Thanks for dropping by to read my article on Beginning program in C, where we cover...
     

    BRAINDUMP ARTICLES

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT