🔥Finding it Damn Hard to Understand C Programming? Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT! Try Programiz PRO for Free: bit.ly/master-c-programming
I love studying with programiz, it's explained so simply :) I'm currently studying for my programming exam that's coming up, so thank you for the free lessons!
Wonderful video! i think for the quiz it is D. &ages[0] because its like what was said where if you use just the name of the array it points to the head by deafult #include int main() { // Write C code here int arr[5] = {34,12,21,54,48}; int largest = *arr; for(int i = 0; i
ages is the base address of the array called ages. The name ages without a subscript always means &ages[0] or ages + 0 . It is the starting address of the array in memory, the address of the first element of the array.
as we are using the %p format specifier we are getting the hexadecimal value if we are using the %d format specifier it is giving different value i am just confused that which is the suitable format specifier for finding the address.
printf("Array Address: %p ", numbers); Why are we not using &numbers in this line of code? isnt 'numbers' supposed to show the value and '&numbers' supposed to show the address?
/* Create a program to find the largest element of an array using pointers. int arr[] = {34, 12, 21, 54, 48); • Assign the first element of the array to a largest variable using pointer int largest = *arr • Run a for loop to access each element of the array. • Compare largest with each array element using pointer largest < *(arr + i) • If the largest variable is smaller than a element, assign the array value to largest largest = *(arr + i) */ printf("
-- Programming Task --
"); int arr[] = { 34, 12, 21, 54, 48 }; int largest = *arr; for (int i = 0; i < 5; i++) { if (largest < *(arr + i)) largest = *(arr + i); } printf("Largest element is %d", largest); Answer is D...
//->find largest number in an array //->print it #include int main() { int arr[] = {0, 20, 31, 95, 10, 22, 70, 11}; int largestNum = *arr; for(int i = 0; i < sizeof(arr)/sizeof(*arr); i++) { if(largestNum < *(arr+i)) largestNum = *(arr+i); } printf("Largest Number: %d", largestNum); return 0; }
Well the first one is an array of pointers and the second one is a pointer constant pointing to the starting address of that array. For example char* arr[]= { "Ann", "Ben", "Dana", "Elle" }; you have a array of 4 pointers pointing to the starting address of each string. The second one , char arr[]={"Anna", "Bob","Dana", "Jim}; Is a array , but you can use the array name as a pointer to the starting address of the array. arr points to the address of first element of the array called arr. It is the same as &arr[0] or arr +0. arr+ 1 is the same as &arr[1] , which points to address of element called "Bob" , arr + 2 same as &arr[2] , which points to the address of element callrd "Dana" and so on through the array.
//char*array[] = {"hi","hello","bye"} //for the first one by using this we can get the output #include int main() { // Write C code here char* array[] = {"hi", "hello", "bye"}; for(int i=0; i < 3;++i){ printf("%s ", *(array+i)); } return 0; } //but the second one is a two-dimensional array so you have to use like this #include int main() { // Write C code here char ARRAY[][20] = {"hi", "hello", "bye"}; for (int i = 0; i < sizeof(ARRAY) / sizeof(ARRAY[0]); ++i) { printf("%s ", ARRAY[i]); } return 0; }
#include int main() { int arr[] = {34, 12, 21, 54, 48}; int largest = *arr; // largest = arr[0] for (int i = 0; i < 5; ++i) { if (largest < *(arr + i)) { largest = *(arr + i); } } printf("The Largest value of an Array is: %d", largest); return 0; }
#include int main(){ int arr[] = {34,12,21,54,48}; int largest = *arr; for(int i = 0; i < 5; ++i){ if (largest < *(arr + i)){ largest = *(arr + i); } } printf("The largest number of array is : %d", largest);
for memory addresses, I am supposed to get 0x(some set of numbers and upper/lowercase letters), but when I run the code at 1:53, I am just getting numbers and a repeated set of uppercase letters Ex: 1 = 000000452BEFF938 3 = 000000452BEFF93C 5 = 000000452BEFF940 7 = 000000452BEFF944 9 = 000000452BEFF948 does anyone know why this is?
well that was her system basically a cloud system and this is your system both will have a different memory location If I do it I will get some other output anyway be happy that you got hexadecimal values
Quiz 'D' #include #include int main(){ int arr[] = {34,12,21,54,48}; int largest = *arr; for(int i = 0; i < 5; i++){ if (largest < *(arr+i)){ largest = *(arr+i); } } printf("Largest number is %d",largest); return 0; }
#include int main() { int arr[5] = {34,12,21,54,48}; int* ptr , largest ; ptr = &arr[0]; largest = *ptr; for (int i = 0 ; i < 5 ; ++i){ if (*(ptr + i) > largest){ largest = *(ptr + i); } } printf("The largest value is %d", largest);
#include int main() { int arr[5] = {34, 12, 21, 54, 48}; int i; int largest = *arr; for (i = 0; i < 5; i++) if (largest < *arr + i) largest = *(arr + i); printf("the largest variable is %d ", largest); return 0; }
#include int main() { int arr[] = { 34 , 12 , 21 , 54 , 48,}; printf(" Find the largest value of this array {34 , 12 , 21 , 54 , 48} : "); int largest = *arr; for(int i=0 ; i < 5 ; ++i) { if ( largest < *(arr + i)){ largest = *(arr+i); } } printf("The largest value is : %d" , largest); return 0; }
#include int main() { int i; int ary[5] = {34, 12, 21, 54, 48}; int largest = *ary; for(int i = 0; i < 5;i++){ printf("%d ", ary[i]); if(largest < *(ary + i)){ largest = *(ary + i); } } printf("the largest value is %d ", largest); return 0; }
#include int main() { int i,size; printf("Enter the size of array : "); scanf("%d", &size); int array[size]; printf("Input Any %d elements :- ",size); for (i = 0; i < size; i++ ) { printf (" array[%d] = ", i); scanf (" %d", &array[i]); } int largest = *array; for (int i = 0; i < 5; ++i) { if (largest < *(array + i)) { largest = *(array + i); } } printf("Largest element of array is %d", largest); return 0; }
I did the quiz like this XD: if(arr[0]>arr[1]) { largest=arr[0]; if(arr[0]>arr[2]) { if(arr[0]>arr[3]) { if(arr[0]>arr[4]) { printf("Array 0 is the largest!"); } } } }
#include /* Create a program to find the largest element of Array using pointer */ int main() { int arr[5] = {2, 4, 23, 5, 7}; int large_element = *arr; for (int i = 0; i < 5; i++) { if (*(arr + i) > large_element) { large_element = *(arr + i); } else { continue; } } printf("
largerst element of array: %d", large_element); return 0; }
#include int main(){ int arr[] = {34, 12, 21, 54, 48}; int largest = *arr; for(int i = 0; i < 5; i ++){ printf("%d vs %d ", largest, *(arr + i)); if(largest < *(arr + i)){ largest = *(arr + i); printf("New largest is %d ", largest); } } printf("THE WINNER IS %d", largest); return 0; }
#include int main (){ int arr[] = {32, 12, 21, 54, 48}; int largest = *arr; for(int i = 0; i < 5; i++){ if(largest < *(arr+i)){ largest = *(arr + i); } } printf("Largest element of array is %i. ", largest); return 0; }
Option D : &ages[0] ------------------------------------------------------------------- #include int main() { int arr[5] = {34, 12, 21, 54, 48}; int largest = *arr; int i; for(i=0; i
Task: #include int main() { int arr[5] = {34, 12, 21, 54, 48}; printf("First element in the array before change: %d ", arr[0]); int largest = *arr; *arr = 65; printf("Fist element in the array after the change: %d ", *arr); for(int i = 0; i < 5; i++) { if (largest < *(arr + i) ) { largest = *(arr + i); } } printf("Largest number of the array: %d ", largest); return 0; } Quiz answer: ages[0] represents the first element of the array, ages[1] represents the second element, and so forth, up to ages[4], which represents the fifth (and last) element of the array.
Answer = /* Program to find largest elemnt of an array using pointers. Instructions: Assign first element of array to a largest variable using pointer, int largest = *arr; run a loop to read each element of the array, compare largest with each array element using pointer. largest < *(arr + i); if largest variable < element assign the array value to largest variable. largest = *(arr + i); */ #include int main() { int arr[5] = {34, 12, 21, 54, 48}; int i; int largest = *arr; for(i = 0; i < 5; i++) { if(largest < *(arr + i)) { largest = *(arr + i); } } printf("Largest value in array = %d", largest); return 0; }
#include int main() { int array[5] = {34, 12, 21, 54, 48}; int largest = *array; for (int i = 0; i < 5; ++i) { if (largest < *(array + i)) { largest = *(array + i); } else { printf("%d ", *(array + i)); } } printf("Largest element of array is %d", largest); return 0; }
When I was in college no internet resources were available. To search something simple as function pointers or array pointers we had to read books from Library. It was a tedious process. A college project could have taken months to complete. I love how modern education has evolved and become so interesting and simple.
int numbers[5]; int sizeOfNum = sizeof(numbers)/sizeof(*numbers); for(int i = 0; i < sizeOfNum; i++){ printf(" Enter an integer value: "); scanf("%d", &numbers[i]); } printf("The values of the array 'numbers' is: "); for(int i = 0; i < sizeOfNum; i++){ printf("%d ", numbers[i]); } int largest = *numbers; printf(" The supposed largest value is: %d", largest); for(int i = 0; i < sizeOfNum; i++){ if(largest < *(numbers+i)){ largest = *(numbers+i); } } printf(" The actual largest value is: %d", largest); return 0; }
#include int main() { int numbers [6] = {23,45,37,54,81,63}; int largest= *numbers; for(int i =0; i < 6; ++i) { if(largest < *(numbers+i)){ largest = *(numbers+i);} } printf("largest element is %d", largest); return 0; }
🔥Finding it Damn Hard to Understand C Programming?
Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
Try Programiz PRO for Free: bit.ly/master-c-programming
I love studying with programiz, it's explained so simply :) I'm currently studying for my programming exam that's coming up, so thank you for the free lessons!
Wonderful video! i think for the quiz it is D. &ages[0] because its like what was said where if you use just the name of the array it points to the head by deafult
#include
int main() {
// Write C code here
int arr[5] = {34,12,21,54,48};
int largest = *arr;
for(int i = 0; i
Plz try to upload the videos faster can't wait to learn any way ur teaching skills are mind blowing
#include
int main()
{
int arr[5] = {34,12,21,54,48};
int largest = *arr;
int i=0;
for(i=0; i
I don't understand how you make it so easy like this. Thanks a lot
Indeed!
Superb! I've liked the explanations for they are well understood.Thanks for making the c programmming knowledge accessible to everyone in need of it.
Amazing, the way you teach is incrible! I got pointers now, I admiti I had some dificult, thank you!
Quz answer is option D.
#include
int main()
{
int arr[5] = {5,10,15,20};
int largest = *arr;
int i=0;
for(i=0; i
wouldn't it be better to start iterating the for loop from i=1
No because then you miss the first array element, as arrays start from value 0
@@Paroseni. but the first element of that array is already assigned as the largest.
You are making good videos. I am thankful to you for this help. This is avery easy way to learn C language from very beginning.
Answer is option D mam because the array name represents the address of the first element of the array
mam i request you upload the series on daily basis....
Thanks for your clear explanations :)
🎉❤❤❤i love the experience here. Keep it up ma'am
Never thougth I would finally use pointers and make the challenge in this video
best tutorial for freshers >> beginners
Can't wait, so curious about ur next series
thank u mam
amazing teacher😍😍
thank you so much ❤❤❤❤🧡🧡🧡🧡💚💚💚💚
Thank you
thanks
nice explanation
Q. In an array, int ages[5], what does ages represent?
A. ages[4]
B. ages[0]
C. &ages[4]
D. &ages[0]
I have to watch video first.
ages[0]
ages is the base address of the array called ages. The name ages without a subscript always means &ages[0] or ages + 0 .
It is the starting address of the array in memory, the address of the first element of the array.
Option D
B. ages[0]
good video
#include
int main() {
int arr[5] = {34,12,21,54,48};
int largest = *arr;
for(int i=0;i
as we are using the %p format specifier we are getting the hexadecimal value if we are using the %d format specifier it is giving different value i am just confused that which is the suitable format specifier for finding the address.
Use %u format spacifier for integer type memory address.
%p is what you are looking for. the hexadecimal value is the acctual memory address where the value is stored.
good good!
printf("Array Address: %p
", numbers);
Why are we not using &numbers in this line of code?
isnt 'numbers' supposed to show the value and '&numbers' supposed to show the address?
numbers with brackets mean "the value of an element", numbers without brackets means "address of the first element"
@@fanman2101 thank you
who has the link to the github
/*
Create a program to find the largest element of an array using pointers.
int arr[] = {34, 12, 21, 54, 48);
• Assign the first element of the array to a largest variable using pointer
int largest = *arr
• Run a for loop to access each element of the array.
• Compare largest with each array element using pointer
largest < *(arr + i)
• If the largest variable is smaller than a element, assign the array value to largest
largest = *(arr + i)
*/
printf("
-- Programming Task --
");
int arr[] = { 34, 12, 21, 54, 48 };
int largest = *arr;
for (int i = 0; i < 5; i++) {
if (largest < *(arr + i))
largest = *(arr + i);
}
printf("Largest element is %d", largest);
Answer is D...
//->find largest number in an array
//->print it
#include
int main()
{
int arr[] = {0, 20, 31, 95, 10, 22, 70, 11};
int largestNum = *arr;
for(int i = 0; i < sizeof(arr)/sizeof(*arr); i++)
{
if(largestNum < *(arr+i))
largestNum = *(arr+i);
}
printf("Largest Number: %d", largestNum);
return 0;
}
the platform could put OpenGl Course I would Apreciate also, bye
💪🏼
Could anyone tell the difference between
char*array[] = {"hi","hello","bye"}
char ARRAY[] = {"hi","hello","bye"}
?
Second one is wrong, because you need a 2D array whereas you're only declaring a single-dimensional array in the second array
Well the first one is an array of pointers and the second one is a pointer constant pointing to the starting address of that array.
For example
char* arr[]= {
"Ann",
"Ben",
"Dana",
"Elle"
};
you have a array of 4 pointers pointing to the starting address of each string.
The second one ,
char arr[]={"Anna", "Bob","Dana", "Jim};
Is a array , but you can use the array name as a pointer to the starting address of the array.
arr points to the address of first element of the array called arr.
It is the same as &arr[0] or arr +0.
arr+ 1 is the same as &arr[1] , which
points to address of element called "Bob" , arr + 2 same as &arr[2] , which points to the address of element callrd "Dana" and so on through the array.
//char*array[] = {"hi","hello","bye"}
//for the first one by using this we can get the output
#include
int main() {
// Write C code here
char* array[] = {"hi", "hello", "bye"};
for(int i=0; i < 3;++i){
printf("%s
", *(array+i));
}
return 0;
}
//but the second one is a two-dimensional array so you have to use like this
#include
int main() {
// Write C code here
char ARRAY[][20] = {"hi", "hello", "bye"};
for (int i = 0; i < sizeof(ARRAY) / sizeof(ARRAY[0]); ++i) {
printf("%s
", ARRAY[i]);
}
return 0;
}
d.&ages[0]
#include
#include
#include
#include
#include
int main() {
int arr[] = {34, 12, 21, 54, 48};
int largest = *arr;
for(int i = 0; i < 5; i++) {
if (largest < *(arr + i)) {
largest = *(arr + i);
}
}
printf("%d", largest);
return 0;
}
D
Quiz answer is B. ages[0]
Hello
#include
int main() {
int arr[] = {34, 12, 21, 54, 48};
int largest = *arr; // largest = arr[0]
for (int i = 0; i < 5; ++i) {
if (largest < *(arr + i)) {
largest = *(arr + i);
}
}
printf("The Largest value of an Array is: %d", largest);
return 0;
}
0 = gyro
why]
The answer is D.
how
d
#include
int main(){
int arr[] = {34,12,21,54,48};
int largest = *arr;
for(int i = 0; i < 5; ++i){
if (largest < *(arr + i)){
largest = *(arr + i);
}
}
printf("The largest number of array is : %d", largest);
return 0;
}
for memory addresses, I am supposed to get 0x(some set of numbers and upper/lowercase letters), but when I run the code at 1:53, I am just getting numbers and a repeated set of uppercase letters
Ex:
1 = 000000452BEFF938
3 = 000000452BEFF93C
5 = 000000452BEFF940
7 = 000000452BEFF944
9 = 000000452BEFF948
does anyone know why this is?
well that was her system basically a cloud system and this is your system both will have a different memory location If I do it I will get some other output anyway be happy that you got hexadecimal values
What platform are you running on
Quiz 'D'
#include
#include
int main(){
int arr[] = {34,12,21,54,48};
int largest = *arr;
for(int i = 0; i < 5; i++){
if (largest < *(arr+i)){
largest = *(arr+i);
}
}
printf("Largest number is %d",largest);
return 0;
}
int numbers[5] = {34, 12, 21, 54, 48};
int* largestPointer = numbers;
for(int i = 0; i < 5; i++) {
int* currentPtr = numbers + i;
if(*currentPtr > *largestPointer) {
largestPointer = currentPtr;
}
}
printf("%d", *largestPointer);
is that a solution
wash your hair pleaseeeeee.
😂😂dfkm
What's wrong with her hair? Stop being racist! If you didn't like it, don't freaking watch her videos, that's it...
Bruh?
Nothings wrong with her hair, you wash your eyes :D
Wash your eyes with acid
#include
int main()
{
int arr[5] = {34,12,21,54,48};
int* ptr , largest ;
ptr = &arr[0];
largest = *ptr;
for (int i = 0 ; i < 5 ; ++i){
if (*(ptr + i) > largest){
largest = *(ptr + i);
}
}
printf("The largest value is %d", largest);
return 0;
}
Programiz Task
#include
int main(void)
{
int numbers[5] = {34, 12, 21, 54, 48};
int largest = *numbers;
for(int i = 0; i < 5; i++)
{
if(*(numbers + i) > largest)
{
largest = *(numbers + i);
}
}
printf("Largest Element: %d", *(&largest)); //lol
return (0);
}
#include
int main() {
int arr[5] = {34, 12, 21, 54, 48};
int i;
int largest = *arr;
for (i = 0; i < 5; i++)
if (largest < *arr + i)
largest = *(arr + i);
printf("the largest variable is %d
", largest);
return 0;
}
#include
int main() {
int arr[5] = {34, 12, 21, 54, 48};
int largest = *arr;
for(int i; i < 5; i++) {
if(largest < *(arr + i)) {
largest = *(arr + i);
}
else {
printf("%d
", *(arr + i));
}
}
printf("Largest number is %d", largest);
return 0;
}
#include
int main() {
int arr[] = { 34 , 12 , 21 , 54 , 48,};
printf(" Find the largest value of this array {34 , 12 , 21 , 54 , 48} :
");
int largest = *arr;
for(int i=0 ; i < 5 ; ++i)
{
if ( largest < *(arr + i)){
largest = *(arr+i);
}
}
printf("The largest value is : %d" , largest);
return 0;
}
#include
int main() {
int arr[]={34,12,21,54,48};
int largest = *arr;
for(int i=0;i
#include
int main()
{
int i;
int ary[5] = {34, 12, 21, 54, 48};
int largest = *ary;
for(int i = 0; i < 5;i++){
printf("%d
", ary[i]);
if(largest < *(ary + i)){
largest = *(ary + i);
}
}
printf("the largest value is %d
", largest);
return 0;
}
#include
int main() {
int i,size;
printf("Enter the size of array : ");
scanf("%d", &size);
int array[size];
printf("Input Any %d elements :- ",size);
for (i = 0; i < size; i++ )
{ printf ("
array[%d] = ", i);
scanf (" %d", &array[i]);
}
int largest = *array;
for (int i = 0; i < 5; ++i) {
if (largest < *(array + i)) {
largest = *(array + i);
}
}
printf("Largest element of array is %d", largest);
return 0;
}
I did the quiz like this XD:
if(arr[0]>arr[1])
{
largest=arr[0];
if(arr[0]>arr[2])
{
if(arr[0]>arr[3])
{
if(arr[0]>arr[4])
{
printf("Array 0 is the largest!");
}
}
}
}
#include
/* Create a program to find the largest element of Array
using pointer */
int main()
{
int arr[5] = {2, 4, 23, 5, 7};
int large_element = *arr;
for (int i = 0; i < 5; i++)
{
if (*(arr + i) > large_element)
{
large_element = *(arr + i);
}
else
{
continue;
}
}
printf("
largerst element of array: %d", large_element);
return 0;
}
#include
int main() {
int arr[5] = { 34, 12, 21, 54, 48 };
for (int i = 0; i < 5; i++) {
if (*arr < *(arr + i)) {
*arr = *(arr + i);
}
}
printf("%d", *arr);
return 0;
}
#include
int main(){
int arr[] = {34, 12, 21, 54, 48};
int largest = *arr;
for(int i = 0; i < 5; i ++){
printf("%d vs %d
", largest, *(arr + i));
if(largest < *(arr + i)){
largest = *(arr + i);
printf("New largest is %d
", largest);
}
}
printf("THE WINNER IS %d", largest);
return 0;
}
#include
void* findProduct (int* num1, int* num2, int* productOF);
int main () {
int number1 = 9;
int number2 = 13;
int products;
int* result = findProduct(&number1, &number2, &products);
printf("The product is %d", *result);
return 0;
}
void* findProduct (int* num1, int* num2, int* productOF){
int product = *num1 * *num2;
*productOF = product;
return productOF;
}
#include
int main() {
int arr[] = {34, 12, 21, 54, 48};
int largest = *arr;
for(int i = 0; i < 5; i++) {
printf("%d
", *(arr + i));
if (largest < *(arr + i)) {
largest = *(arr + i);
}
}
printf ("largest : %d
", largest);
return 0;
}
ages represent the memory address of the zeroth array element. ie, ages+0 equals &ages[0]. Option D is the correct answer
#include
int main (){
int arr[] = {32, 12, 21, 54, 48};
int largest = *arr;
for(int i = 0; i < 5; i++){
if(largest < *(arr+i)){
largest = *(arr + i);
}
}
printf("Largest element of array is %i.
", largest);
return 0;
}
Ages represent the first element in the array, which is ages[0]
Option D : &ages[0]
-------------------------------------------------------------------
#include
int main()
{
int arr[5] = {34, 12, 21, 54, 48};
int largest = *arr;
int i;
for(i=0; i
Task:
#include
int main() {
int arr[5] = {34, 12, 21, 54, 48};
printf("First element in the array before change: %d
", arr[0]);
int largest = *arr;
*arr = 65;
printf("Fist element in the array after the change: %d
", *arr);
for(int i = 0; i < 5; i++) {
if (largest < *(arr + i) ) {
largest = *(arr + i);
}
}
printf("Largest number of the array: %d
", largest);
return 0;
}
Quiz answer: ages[0] represents the first element of the array, ages[1] represents the second element, and so forth, up to ages[4], which represents the fifth (and last) element of the array.
4:10 "Ith element" 💀
U just saved this semester
Answer =
/*
Program to find largest elemnt of an array using pointers.
Instructions:
Assign first element of array to a largest variable using pointer,
int largest = *arr;
run a loop to read each element of the array, compare largest with each array element using pointer.
largest < *(arr + i);
if largest variable < element assign the array value to largest variable.
largest = *(arr + i);
*/
#include
int main()
{
int arr[5] = {34, 12, 21, 54, 48};
int i;
int largest = *arr;
for(i = 0; i < 5; i++)
{
if(largest < *(arr + i))
{
largest = *(arr + i);
}
}
printf("Largest value in array = %d", largest);
return 0;
}
awl hindiya zwina
Alloh rozi bolsin
Great!
#include
int main() {
int array[5] = {34, 12, 21, 54, 48};
int largest = *array;
for (int i = 0; i < 5; ++i) {
if (largest < *(array + i)) {
largest = *(array + i);
}
else {
printf("%d
", *(array + i));
}
}
printf("Largest element of array is %d", largest);
return 0;
}
When I was in college no internet resources were available. To search something simple as function pointers or array pointers we had to read books from Library. It was a tedious process.
A college project could have taken months to complete.
I love how modern education has evolved and become so interesting and simple.
Your video is really helpful to understand how a point arithmetic works and fundamentally what an array is
This video is great,the last programming task makes it perfect.🛐
Thanks
D
good job you guys
Free Palestine 🇵🇸🫀
#include
int main() {
int arr[5] = {34,12,21,54,48};
int largest = *arr;
for(int i=0; i
#include
#include
int stdsize = 20;
int main() {
int numbers[5];
int sizeOfNum = sizeof(numbers)/sizeof(*numbers);
for(int i = 0; i < sizeOfNum; i++){
printf("
Enter an integer value: ");
scanf("%d", &numbers[i]);
}
printf("The values of the array 'numbers' is: ");
for(int i = 0; i < sizeOfNum; i++){
printf("%d ", numbers[i]);
}
int largest = *numbers;
printf("
The supposed largest value is: %d", largest);
for(int i = 0; i < sizeOfNum; i++){
if(largest < *(numbers+i)){
largest = *(numbers+i);
}
}
printf("
The actual largest value is: %d", largest);
return 0;
}
#include
int main() {
int numbers [6] = {23,45,37,54,81,63};
int largest= *numbers;
for(int i =0; i < 6; ++i) {
if(largest < *(numbers+i)){
largest = *(numbers+i);}
}
printf("largest element is %d", largest);
return 0;
}
#include
int main() {
int arr[] = {34, 12, 21, 54, 48};
int largest = *arr;
for(int i=1; i