Tuesday, December 4, 2018

Cloud

-The cloud is a term referring to accessing computer, information technology (IT), and software applications through a network connection
-Advantages:
  1. Cloud computing has many advantages. It’s often faster to provision the service
  2. Prevents data theft
  3. Flexible
  4. Reduces cost
  5. Increases mobility
  6. High sustainability
  7. Prevent loss of data
-Disadvantages:
  1. Weakness of shared technology
  2. Possible misuse
  3. Breach of privacy

Structure and Union

-A structure is a user-defined data type available in C that allows to combining data items of different kinds while a union is a special data type available in C that allows storing different data types in the same memory location.
-Similarities:
  1. Both are user-defined data types used to store data of different types as a single unit.
  2. Their members can be objects of any type, including other structures and unions or arrays. A member can also consist of a bit field.
  3. Both structures and unions support only assignment = and sizeof operators. The two structures or unions in the assignment must have the same members and member types.
  4. A structure or a union can be passed by value to functions and returned by value by functions. The argument must have the same type as the function parameter. A structure or union is passed by value just like a scalar variable as a corresponding parameter.
  5. ‘.’ operator is used for accessing members.
-Differences:
  1. In structure each member get separate space in memory.
  2. The total memory required to store a structure variable is equal to the sum of size of all the members.
  3. In union, the total memory space allocated is equal to the member with largest size. All other members share the same memory space. This is the biggest difference between structure and union.
  4. All the members can be initialized while declaring the variable of structure. Only first member can be initialized while declaring the variable of union.


Recursive Function

-A recursive function is a function that calls itself repeatedly until a condition is met.
-Recursion makes program elegant and more readable.
-Recursion is much slower than loops
How recursion works in C programming?