Day of Microprocessor
Updated: Nov 25, 2022
So the day started pretty smooth and had a very good feeling for all day, but then we got our first ever day where we only learnt about Microprocessor and nothing else.
While heading to college, we were free and little stressed cause there was extra 2hrs lecture on Microprocessor. We were given a surprise entry from the lecturer and the lecture continued till the recess, after we had peacefull lunch we were given another surprise by the lecturer and the lecture were continued till the wnd of the day, we were learning and learning and learning till 1hr ago.
Leaving this behind, todays topic is offcourse on Programming, so we will be learning about, Arrays.
So what are Arrays, well it's not the Array in Marathi, which means calling someone, or regretting or in arrogance and so on..
Well infact, to store data in a contiguous manner, in a sequential manner, we use Arrays. As there are many data types like characters, integers, float, double, long integer, and so on.. So in array we can use any data type, and any length, till we don't overflow the memory. We will be safe, nothing will happen even if it happen.
So to initialise Array in C,
int array[10] ;
Here, int is the data type of the data stored in the array.
The array is the name of the array, well you can assign any name to it, whether it maybe your name, your friends name, anything but it should start with either a character or an underscore i.e., "_", you should never start the name with a number, cause you don't want to have your name with numbers, that is still creepy and disgusting.
When we have initialised an array now, we can store data in it, and to store data we have to now put a loop on the array where the user enters the data and the loop will read the data and store it into the Array, that you just made. The code goes as follow,
for( int i=0; i<10; i++ )
{ scanf("%d",&a[i]);
}
So if you now run your code there will be a wait for you, finally someone waiting for me, so there you have to enter your elements nothing but your data, and pressing enter will just store your elements one by one, and boom we have our array ready to do more functions, more operations than us.
Well there are many more things associated with arrays, the searching, the sorting, the traversing, there concatenation and much more stuff, right now we only learn about the initialisation and storing data into an array, next time let's jump to the sorting, again my favourite thing to talk, well meyou in next blog.
Stay Safe
Keep Coding
Recent Posts
See AllMy last blogg about gaming from your android, or my other blogs, that I published earlier were not a big hit, not like this website or...
https://drive.google.com/file/d/1VhlELPb9Q9Bz7GL9Bkt3RiEIOk0boGai/view?usp=drivesdk
PYTHON
https://drive.google.com/file/d/1UOBHIYfK-xuogxIqZJEsphpSObHWtarh/view?usp=drivesdk
https://drive.google.com/file/d/1S2w26uRCBuZNXKBjy6kfMJxe8aZ4_6Lz/view?usp=drivesdk
https://docs.google.com/document/d/1RIdVKj6k5iYmim8G4hPRFdTRNRKuY9Fk/edit?usp=drivesdk&ouid=101610996497622513142&rtpof=true&sd=true
https://drive.google.com/file/d/1Q0mx_tggT6IP8OYcOMsXhrFQiruPq27B/view😎