C Programing Tutorial Complete Discussion, examples A+Grade - 26670

Solution Posted by


Rating : No Rating
Solution Detail
Price: $160.00
Request Description


1.      What is a compiler?

2.      How is a C program run?

3.      How is a C program compiled usually?

4.      Are upper and lower case equivalent in C?

5.      What the two different kinds of error which can be in a program?

6.      Write a command to print out the message \"Wow big deal\".

7.      Write a command to print out the number 22?

8.      Write two commands to print out \"The 3 Wise Men\" two different ways.

9.      Why are there only a few reserved command words in C?

10.  What is an operating system for?

11.  What is a pseudo-device name?

12.  If you had a C source program which you wanted to call `accounts\' what name would you save it under?

13.  What would be the name of the file produced by the compiler of the program in 3?

14.  How would this program be run?

15.  How is a library file incorporated into a C program?

16.  Name the most common library file in C.

17.  Is it possible to define new functions with the same names as standard library functions?

18.  What is another name for a library file?

19.  What is a block?

20.  Name the six basic things which make up a C program.

21.  Does a C program start at the beginning? (Where is the beginning?)

22.  What happens when a program comes to a } character? What does this character signify?

23.  What vital piece of punctuation goes at the end of every simple C statement?

24.  What happens if a comment is not ended? That is if the programmer types /* .. to start but forgets the ..*/ to close?

25.  Write a function which takes two values a and b and returns the value of (a*b).

26.  Is there anything wrong with a function which returns no value?

27.  What happens if a function returns a value but it is not assigned to anything?

28.  What happens if a function is assigned to an object but that function returns no value?

29.  How can a function be made to quit early?

30.  What is an identifier?

31.  Say which of the following are valid C identifiers:

1.      Ralph23

2.      80shillings

3.      mission_control

4.      A%

5.      A$

6.      _off

32.  Write a statement to declare two integers called i and j.

33.  What is the difference between the types floa and double.

34.  What is the difference between the types int and unsigned int?

35.  Write a statement which assigns the value 67 to the integer variable \"I\".

36.  What type does a C function return by default?

37.  If we want to declare a function to return long float, it must be done in, at least, two places. Where are these?

38.  Write a statement, using the cast operator, to print out the integer part of the number 23.1256.

39.  Is it possible to have an automatic global variable?

40.  Name two ways that values and results can be handed back from a function.

41.  Where are parameters declared?

42.  Can a function be used directly as a value parameter?

43.  Does it mean anything to use a function directly as a variable parameter?

44.  What do the symbols * and & mean, when they are placed in front of an identifier?

45.  Do actual and formal parameters need to have the same names?

46.  What is a global variable?

47.  What is a local variable?

48.  What is meant by calling a block (enclosed by braces {} ) a \"sealed capsule\"?

49.  Do parameters make functions leaky? i.e. Do they spoil them by letting the variables leak out into other functions?

50.  Write a program which declares 4 variables. Two integer variables called number_of_hats,counter which are GLOBAL and two float variables called x_coord,y_coord which are LOCAL inside the function main(). Then add another function called another() and pass x_coord,y_coord to this function. How many different storage spaces are used when this program runs? (Hint: are x_coord,y_coord and their copies the same?)

51.  Define a macro called \"birthday\" which describes the day of the month upon which your birthday falls.

52.  Write an instruction to the preprocessor to include to maths library math.h.

53.  A macro is always a number. True or false?

54.  A macro is always a constant. True or false?

55.  What is a pointer?

56.  How is a variable declared to be a pointer?

57.  What data types can pointers \"point to\"?

58.  Write a statement which converts a pointer to a character into a pointer to a double type. (This is not as pointless as it seems. It is useful in dealing with unions and memory allocation functions.)

59.  Why is it incorrect to declare: float *number = 2.65; ?

60.  Write a program which simply prints out: 6.23e+00

61.  Investigate what happens when you type the wrong conversion specifier in a program. e.g. try printing an integer with %f or a floating point number with %c. This is bound to go wrong - but how will it go wrong?

62.  What is wrong with the following statements?





Solution Description

best an