DEV Community

Cover image for Things to know
Tony.Rese5
Tony.Rese5

Posted on • Edited on

1

Things to know

  1. What is the difference between a function and a method?

    A- A function returns a value, but a procedure does not. A method is similar to a function, but is internal to part of a class. The term method is used almost exclusively in object-oriented programming. A function is something that takes a bunch of inputs and returns one or more values.

  2. Why are structures a better way to define data than just declaring a series of variables?

    A- A structure definition is like a blueprint for the structure. It takes up no storage space itself instead just specifies what variables of this structure type will look like. An actual structure variable is like a box with multiple data fields inside of it. Consider the idea of a student database. One student record contains multiple items of information (name, address, SSN, GPA, etc)

Top comments (3)

Collapse
 
seanolad profile image
Sean
Comment hidden by post author
Collapse
 
tony5293 profile image
Tony.Rese5
Comment hidden by post author
Collapse
 
seanolad profile image
Sean
Comment hidden by post author

Some comments have been hidden by the post's author - find out more

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →