Output of C-language variables

Source: Internet
Author: User

#include <stdio.h>int main () {int n = 100;  char c = ' @ ';    Characters enclosed in single quotes, strings surrounded by double quotes float money = 93.96;    printf ("n=%d, C=%c, money=%f\n", N, c, money); return 0;}

\nRepresents a line break

//The following is a comment. Annotations are used to describe what the code means, so that we can read more easily and it is part of the code. The compiler ignores the comment content.


The result of direct output without a variable is the same.


#include <stdio.h>

    1. int Main ()

    2. {

    3. Span class= "Sh_type" >float money = 93.96

    4. printf ( \n " 100 money);


    5. return 0

    6. }


Output of C-language variables

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.