What do you meant by a function, Programming Languages

Assignment Help:

(a) (i) What do you meant  by a function? Are functions required when writing a C program?
(ii) State one of the advantages to the use of functions.
(iii) What do you meant by a function call? From what parts of a program can a function be called?

(b) Each of the following is the first line of a function definition.

Explain the meaning of each.

(i) float f(float a, float b)
(ii) long f(int zorro)
(iii) void f(double ab)
(iv) char f(void)

(c) Prepare the first line of the function definition, including the formal argument declarations, for each of the situations described
below.

(i) A function called sample generates and returns an integer quantity.

(ii) A function called root accepts two integer arguments and returns a floating-point result.

(iii) A function called convert accepts a character and returns another character.

(d) Prepare a program in C which will compute the square of the numbers from 1 to 10 and gives the output. Here the program will consist of a function square which will return the square of a number.


Related Discussions:- What do you meant by a function

Shell script to check a given string is palindrome or not, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Basics question, I am building wpf application and i want to install this a...

I am building wpf application and i want to install this application on a server pc and share it to other pces on a net work , my question is i have static class that contain data

Depth estimation from a single view camera, i doing a project about depth e...

i doing a project about depth estimation, i have done some research, and i used the block matching algorithm to get the motion vectors from the image sequences, i now have the prob

What is .net?, What is .NET? It is a foundation fairly neutral structure...

What is .NET? It is a foundation fairly neutral structure. Is a coating between the son and the selection language? It can handle many selection dialects, such as VB.NET,

Design and create a new class, You are to design and create a new class cal...

You are to design and create a new class called SelectCallDataDialog, which opens by clicking browse  buttons for selection of ringtones,  vibrations or leds. Depending on which th

Matlab, i have a=[0 1 1 2 2 3 6 7 0 4 ] i want to delent elemet but keep it...

i have a=[0 1 1 2 2 3 6 7 0 4 ] i want to delent elemet but keep its position i.e a(4)=[] it gives me 0 1 1 2 3 6 7 0 4 but i need 0 1 1 [] 2 3 6 7 0 4

Program that takes integer array of 8 elements, Write a program that takes ...

Write a program that takes integer array of 8 elements from user and find the smallest element among them using pointers

Java Programming, How to i write a car rental program in jgrasp

How to i write a car rental program in jgrasp

X86 Assembly, You are to Use ASCII operations to design an IA-32 assembly ...

You are to Use ASCII operations to design an IA-32 assembly language program which will do addition and subtraction on positive integers of any length represented in characters. T

C++ language introduces, C++ language introduces object-oriented programmin...

C++ language introduces object-oriented programming (OOP) features to C language. It offers classes, which provide the four features commonly present in OOP (or some non-OOP) langu

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