100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary Basics of programming and C language $7.99   Add to cart

Summary

Summary Basics of programming and C language

 0 view  0 purchase
  • Course
  • Institution

This course includes all the basic information of programming starting with C language, Array and much more

Preview 2 out of 11  pages

  • October 28, 2024
  • 11
  • 2024/2025
  • Summary
  • Secondary school
  • 1
avatar-seller
V.V.P Engineering College Computer Programming & Utilization


Array And String
Chapter No: 4
Array & String


Chapter No: 4 Array & String

Mentioned
1 What is array? Types of array?
topics are
2 How can we define single dimensional array?
available3 in Explain two dimensional arrays with example.
document 4 What is string? How can we enter string in C program?
5 Explain different string function with example.


Q-1. What is array? Explain types of array.
Answer:

Simple variable can store only one value at a time, but if you want to store
more than one value into single variable then C language provide derived data
type array.
Array is collection of elements of the same data type.
Array is one kind of data structure in which we can store multiple values at
time and it is known by a single name.
Each element into array can distinguish with help of index.

There are three types of array in C.


Array




One Two Multi
Dimensional Dimensional Dimensional
Array Arrays Arrays




Chapter No: 4

, V.V.P Engineering College Computer Programming & Utilization


For example if you want to store rollno of single student then simple variable
can be used, but if you want to store rollno of 100 students then there are two
option.

1) One may use 100 variables to store 100 values
2) One may use array with size of 100

Obviously you can say that second option is far better as we just need to
remember only one name of array rather than the 100 name of variables.



Q-2. Explain one dimensional array with example.
Answer:

An array that represent list of items with help of only one index (subscript)
then it is known as one dimensional array.

Syntax:

<Data type> <array name> [<size>];

Here, Data type represent the type of data which we want to store into array.
Array name is the name of array which we want to create.
Size defines the size of array or total number of value that we want to store
into array.

Array can be initialized in two different ways:

1) Compile time initialization
2) Run time initialization

1) Compile Time Initialization:

In this type of initialization elements of array can be initialized at the
time of array declaration.
The values are assigned to each array elements enclosed within braces
and separated by comma.
Syntax:

<Data type> <array name> [<size>] = {value1, value2 … value3};


Chapter No: 4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Yourhelper11. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77254 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart