Advanced error checking and structures, C/C++ Programming

Assignment Help:

   It is standard on functions to provide some indication that the function has succeeded in its operation. Consider the Scanf function:

    scanf("%d",&number1);
 
If the function does indeed get a integer from the keyboard then everything is okay, but what happens if the user types in a char or float etc. The program might crash, it is common to write functions which never crash but return an error code. On the function scanf, the full prototype is

    int scanf("format",&variables);
 
The int is used to provide details of correct operation i.e. number of values  input or '-1' error . We can use this in programs to trap errors and repeat functions etc. The appended ANSI library shows full prototypes and meaning of return values from functions.


Related Discussions:- Advanced error checking and structures

Program to calculate the average sales for each employee , There are 2...

There are 25 employees in a business. Each employee has 5 sales each day of the month (Assume there are 30 days in each month of the year). Draw a flowchart for a pr

Array, #an array that accept input and gives an output

#an array that accept input and gives an output

Introduction of computer and programming concept, Classify computer system ...

Classify computer system according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

Applied scientific computing in c++, i have a project that is due this Wedn...

i have a project that is due this Wednesday and i was wondering if i can get help in doing it?

Algorithm, Write a algorithm to explain the processof wakingbup in morning

Write a algorithm to explain the processof wakingbup in morning

Define functions with arguments and no return values, Define Functions with...

Define Functions with arguments and no return values The calling function will read a data from the terminal and pass it on to called as function and this will work good as the

Operation on string - c ++ program, Operation on String - C ++ Program: ...

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le

Write a recursive function with cylinders, I need to make a fractal trees i...

I need to make a fractal trees in OpenGL C++ . The method used is to write a recursive function with cylinders of different sizes and angles to create the tree trunk and branches.

Using c language, I have a program and I want someone to fix it for me by u...

I have a program and I want someone to fix it for me by using basic c language program.

Inheritance, example of program to ad two numbers

example of program to ad two numbers

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd