Finding C programming hard? We’ve got you! 🚀Get 60% off on Programiz PRO Lifetime Plan this Black Friday-pay once for skills that last forever. Don’t miss out, it’s a limited-time offer! 👉Grab your discount now: bit.ly/blkfriday-24-yt
@jessicabuehne9202 жыл бұрын
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!
@shijothomas41082 жыл бұрын
ages represent the memory address of the zeroth array element. ie, ages+0 equals &ages[0]. Option D is the correct answer
@stealthy_doctor5 ай бұрын
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
@phoneix2488610 ай бұрын
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.
@BelalAlobieda2 жыл бұрын
I don't understand how you make it so easy like this. Thanks a lot
@IDeserveToGetTortured Жыл бұрын
Indeed!
@emmanueljulius18272 жыл бұрын
Ages represent the first element in the array, which is ages[0]
@NyangwaKulwa Жыл бұрын
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.
@sunnypreetham29332 жыл бұрын
Plz try to upload the videos faster can't wait to learn any way ur teaching skills are mind blowing
@hongkyulee97243 ай бұрын
Your video is really helpful to understand how a point arithmetic works and fundamentally what an array is
@sushilgbp Жыл бұрын
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
@18fatima1510 ай бұрын
wouldn't it be better to start iterating the for loop from i=1
@Paroseni.8 ай бұрын
No because then you miss the first array element, as arrays start from value 0
@TONY_GEORGE-254 ай бұрын
@@Paroseni. but the first element of that array is already assigned as the largest.
@AliHk-qs8vmАй бұрын
@@Paroseni.you already included first array in this part ( int largest = *arr; ). So there is no problem to start the for loop from ( i = 1 ).
@AliHk-qs8vmАй бұрын
@@18fatima15 I think you are right
@rodolfoc.nascimento63012 жыл бұрын
Amazing, the way you teach is incrible! I got pointers now, I admiti I had some dificult, thank you!
@AIVerse3.02 жыл бұрын
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.
@light-warrior10 ай бұрын
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.
@violetv196411 ай бұрын
U just saved this semester
@vissakanvj817 Жыл бұрын
This video is great,the last programming task makes it perfect.🛐
@alexquinlan18552 жыл бұрын
Thanks for your clear explanations :)
@jonathanmawuena90817 ай бұрын
🎉❤❤❤i love the experience here. Keep it up ma'am
@SaiSiddartha-l9o6 ай бұрын
Answer is option D mam because the array name represents the address of the first element of the array
@INFINITEonYouTube23 күн бұрын
Amazing video even 2 years later.
@rodolfoc.nascimento63012 жыл бұрын
Never thougth I would finally use pointers and make the challenge in this video
@likithm99042 жыл бұрын
mam i request you upload the series on daily basis....
@NoumanAhmedMominАй бұрын
very easy to learn . not much hardwork needed.
@nandishnandish7436 Жыл бұрын
Can't wait, so curious about ur next series
@nagashreenb476320 күн бұрын
void main() { double salary; printf("Enter your salary:"); scanf("%lf",&salary); double* ptr=&salary; printf("using the pointer to print the salary:%lf ", *ptr); double newsalary=*ptr*2; printf("Newsalary:%lf",newsalary); }
@markbarasa4549 Жыл бұрын
best tutorial for freshers >> beginners
@b7sh_b7sh Жыл бұрын
amazing teacher😍😍
@fivefingerslk3867 Жыл бұрын
thank you so much ❤❤❤❤🧡🧡🧡🧡💚💚💚💚
@omaeshebl4732 Жыл бұрын
@red1iteee Жыл бұрын
#include int main() { int arr[5] = {34,12,21,54,48}; int largest = *arr; for(int i=0;i
@onic9623 Жыл бұрын
Option D : &ages[0] ------------------------------------------------------------------- #include int main() { int arr[5] = {34, 12, 21, 54, 48}; int largest = *arr; int i; for(i=0; i
@angelffg3 ай бұрын
Great!
@sirishasaragadam76032 жыл бұрын
thank u mam
@countrysideshowyaigrock4689 Жыл бұрын
#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; }
@programizstudios2 жыл бұрын
Q. In an array, int ages[5], what does ages represent? A. ages[4] B. ages[0] C. &ages[4] D. &ages[0]
@AIVerse3.02 жыл бұрын
I have to watch video first.
@socialgamer232 жыл бұрын
ages[0]
@rickzalman41362 жыл бұрын
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.
@anonymouszn49782 жыл бұрын
Option D
@adebulejohnykeyz45942 жыл бұрын
B. ages[0]
@zawnaing344 Жыл бұрын
thanks
@worldsvariety53662 жыл бұрын
Thank you
@vazhasaginadze6711 Жыл бұрын
good job you guys
@adityarajput17782 жыл бұрын
nice explanation
@Selcuk._._7 ай бұрын
/* 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...
@bullshit48515 күн бұрын
The answer here is D. &ages[0].
@elizabethbabykuriakose74999 ай бұрын
good video
@laurenzwegler71414 ай бұрын
//->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; }
@thiagaodavez5465 Жыл бұрын
good good!
@hardikbisht682 жыл бұрын
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.
@himanshushahi37952 жыл бұрын
Use %u format spacifier for integer type memory address.
@tibish5 ай бұрын
%p is what you are looking for. the hexadecimal value is the acctual memory address where the value is stored.
@aswinmanoj8681 Жыл бұрын
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?
@fanman2101 Жыл бұрын
numbers with brackets mean "the value of an element", numbers without brackets means "address of the first element"
@aswinmanoj8681 Жыл бұрын
@@fanman2101 thank you
@endeavored2 жыл бұрын
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; }
@umar89804 ай бұрын
Alloh rozi bolsin
@akshaybagalkotkar78332 жыл бұрын
#include int main() { int arr[5] = {34,12,21,54,48}; int largest = *arr; int i=0; for(i=0; i
@nagashreenb476320 күн бұрын
int main() { int arr[6]={34,12,21,54,48}; int largest=*arr; for(int i=0;i
@racingfan372 Жыл бұрын
Quiz answer is B. ages[0]
@nandishnandish7436 Жыл бұрын
Hello
@Ayman-bu1rz6 ай бұрын
awl hindiya zwina
@rodolfoc.nascimento63012 жыл бұрын
the platform could put OpenGl Course I would Apreciate also, bye
@socialgamer232 жыл бұрын
Could anyone tell the difference between char*array[] = {"hi","hello","bye"} char ARRAY[] = {"hi","hello","bye"} ?
@anic17162 жыл бұрын
Second one is wrong, because you need a 2D array whereas you're only declaring a single-dimensional array in the second array
@rickzalman41362 жыл бұрын
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.
@ranjithn0605 Жыл бұрын
//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; }
@techMohh2 жыл бұрын
who has the link to the github
@sandeepvarma84537 ай бұрын
d.&ages[0]
@zindycangaming98512 ай бұрын
4:10 "Ith element" 💀
@danielbalint80342 жыл бұрын
0 = gyro
@orewoleayomide78558 ай бұрын
why]
@albertamenyah3019 Жыл бұрын
The answer is D.
@orewoleayomide78558 ай бұрын
how
@drstrange8383 Жыл бұрын
💪🏼
@errorhostnotfound1165 Жыл бұрын
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?
@adwaithanil374710 ай бұрын
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
@lulztigre10 ай бұрын
What platform are you running on
@formodapkАй бұрын
dark mode
@keshavdixit082 жыл бұрын
D
@Isasseguya11 ай бұрын
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; }
@shubhamsingh-bi7np2 жыл бұрын
d
@abobakrabdoun98666 ай бұрын
Free Palestine 🇵🇸🫀
@davidnaderer8464 Жыл бұрын
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
@fountain988610 ай бұрын
wash your hair pleaseeeeee.
@lulztigre10 ай бұрын
😂😂dfkm
@the_night_traveler7 ай бұрын
What's wrong with her hair? Stop being racist! If you didn't like it, don't freaking watch her videos, that's it...
@superman1337H6 ай бұрын
Bruh?
@the_night_traveler6 ай бұрын
Nothings wrong with her hair, you wash your eyes :D
@senor_173 ай бұрын
Wash your eyes with acid
@aguywithoutaname Жыл бұрын
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); }
@daireosullivan11938 ай бұрын
#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; }
@chinenyeumeaku9262 Жыл бұрын
#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; }
@YUPENGMA-h1y Жыл бұрын
#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; }
@heevar6169 Жыл бұрын
#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; }
@hoseinfiroozmandi7089 Жыл бұрын
#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; }
@tteokmember Жыл бұрын
#include int main() { int arr[] = {34, 12, 21, 54, 48}; int largest = *arr; for(int i=1; i
@hristijanp.8500 Жыл бұрын
#include int main() { int arr[]={34,12,21,54,48}; int largest = *arr; for(int i=0;i
@JeongWoonKim-i4j Жыл бұрын
#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; }
@paramgandhi2760 Жыл бұрын
#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; }
@freehug071 Жыл бұрын
#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; }
@brightgames6576 Жыл бұрын
#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; }
@lukelombard92 Жыл бұрын
#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; }
@yusifabbasov9219 Жыл бұрын
#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; }
@TheHeraldOfSpring3 ай бұрын
#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; }
@madinaabduganiyeva924910 ай бұрын
#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; }
@callumapps58733 ай бұрын
#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; }
@madinaabduganiyeva924911 ай бұрын
#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; }
@mohammadrezajavadi349811 ай бұрын
Thanks
@dnwint26 ай бұрын
D
@shivamray66899 ай бұрын
#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; }
@huseynmalshev7073 Жыл бұрын
#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; }
@thelegendarysummersky31899 ай бұрын
#include int main() { int arr[5] = {34,12,21,54,48}; int largest = *arr; for(int i=0; i