CS110_02a_dataTypes. - Variables A simple program illustrating the basic data types#include< stdio.h>#include< stdlib.h> main int year

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Variables A simple program illustrating the basic data types: #include < stdio.h > #include < stdlib.h > main() { int year; float fee; double deficit; char category; year = 2001; fee = 721.65; deficit = 3.22E40; category = 'A'; // // // // assign assign assign assign integer value float value a double value character value printf("value of year = %d\n", year); printf("value of fee = %f\n", fee); printf("value of deficit = %e,%g\n", deficit,deficit); printf("value of category = %c\n", category ); } ...
View Full Document

This note was uploaded on 10/05/2011 for the course COMPUTER S 110-1 taught by Professor Tumblin during the Spring '11 term at Northwestern.

Ask a homework question - tutors are online