Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
a more advanced data type is the structure here we can define a template as a collection of different variables eg struct birthdate
it is standard on functions to provide some indication that the function has succeeded in its operation consider the scanf
talking to io boards inside a computer or microcontroller depends upon the principles used by the microprocessor to address physical devices on
write a program to create a binary file and store the following data hello 0x00301 1234 using visual studio examine the binary file and note
write a program to compute the following equation for values of time y 2x3 the values of time are stored in
although we can handle most io routines with getc and putc there are file versions of fgets fputs fprintf and fscanf the syntax is
access to the channeldevices is achieved by means of general purpose io routines theses are standard functions described in stdioh header file
within c we access external devices by means of a pointer ie address the address could point to any memory mapped device ie ram rom duart disk
write a c program to input your full forename and full surname eg james mccarren and display in one string your complete initial and surname ie j
available in the stringh header file are the following routines strcatstring1string2 this joins string2 to string1 care must be
the concept of a string in c is difficult because a string is a collection of characters stored in memory terminated by a null string ie 0 let
questistarting with a blank solution write a program to prompt the user for an employee number hourly rate and hours worked compute and display the
we started off taking about input output cpu and memory devices within c we need a method of storing large amounts of data in memory we have used the
write a function to calculate the exchange rate of pounds to dollars answer td 2xtp the parameter passed over is the
we are now quite happy to use the basic mathematical expressions however in engineering we use scientific functions ie sin cos ln etc
within programs we very often want to execute a different section of code depending upon various conditions within c the if statement is used to
write a c program to compute the factorial of 5 ie 1x2x3x4x5 etcwrite a c program to calculate the output y for a given value of x for the
step 1 define the program headers and the variables include ltstdiohgt include ltmathhgt include ltstringhgt include
mathematical statements and assignments within c we can directly load up the variable from within the program using the mathematical
write a c program to input five numbers and print them out on a new linewrite a c program to input three real numbers and print them out as
step 1 define the start of the program it should be noted that within c all commands should end in a semi-colon for most of your programs the
data is required to be fed into the program input and sent out of the program output considering the draughtsman using a cad station the input
we can combine more than one variable on the same line ie float number1number2number3 etcsometimes we want to mix the variable types used on the
within software languages we have the ability to store information in mail boxes ie memory slots which are given names to represent the box the
all languages are divided into six sections - variables io maths conditional expressions arrays functions subroutines and file handlers learning