#include <stdio.h> int main() { int number; printf("Enter Your Number: "); scanf("%d", &number); (number % 2 == 0) ? printf("The number is even") : printf("The number is odd"); return 0; }
@vishnuvishnu803211 сағат бұрын
33 33
@AYUBBASHIRAHMED13 сағат бұрын
#include <stdio.h> #include <stdlib.h> int main() { int n = 4; int* age=(int*)malloc(n*sizeof(int)); if(n==0){ printf("MEMORY IS NOT AVAILABLE"); return 0; } printf("ENTER FOUR AGES: "); for(int i=0; i<n; ++i){ scanf("%d",age+i); } for(int i=0; i<n; ++i){ printf("AGE IS: %d ",*(age+i)); } n=6; age=(int*)realloc(age,n*sizeof(int)); if(n==0){ printf("MEMORY IS NOT AVAILABLE"); return 0; } printf("ENTER TWO MORE AGES: "); for(int i=4;i<n;++i){ scanf("%d",age+i); } for(int i=0;i<n;++i){ printf("AGE IS: %d ",*(age+i)); } return 0; }
@RomarGallaza22 сағат бұрын
#include <stdio.h> #include <math.h> int main() { double number; printf("Enter a number: "); scanf("%lf", &number); double squareroot = sqrt(number); double result = pow(number, squareroot); printf("The result of %.2lf raise to %.2lf is %lf ", number, squareroot, result); }
@CathleenDarigoКүн бұрын
Pure C Programming Eliminate IF Then ?
@galjosephshayerКүн бұрын
can someone please help me understand why my version does not produce a numerical solution? #include <stdio.h> int main() { char operator; double num1, num2; printf("choose an operator[+,-,*,/]: "); scanf("%c", &operator); printf("enter first number; "); scanf("%lf", &num1 ); printf("enter second number; "); scanf("%lf", &num2 ); double result; switch (operator) { case '+': result = num1 + num2; break; case '-': result = num1 - num2; break; case '*': result = num1 * num2; break; case '/': result = num1 / num2; break; } printf("result: ", result); return 0; }
@AxerDeBeastКүн бұрын
#include <stdio.h> int main() { double number; printf("Enter your number: "); scanf("%lf", &number); if (number > 0){ printf("The Number is Posetive."); } else if (number < 0){ printf("The Number is Negative."); } else { (number = 0); printf("The Number is 0."); } return 0; }
@AxerDeBeastКүн бұрын
int main() { bool value = (9 > 9); printf("%d", value); return 0; }
@AxerDeBeastКүн бұрын
#include <stdio.h> int main() { char a = '8'; int b = 12; int result = a + b; printf("%d", result); return 0; } Output : 68
@dateengineerazurecloud2904Күн бұрын
what code IDE is this? thank you
@hongkyulee9724Күн бұрын
Your video is really helpful to understand how a point arithmetic works and fundamentally what an array is
@noahcastor3239Күн бұрын
My solution has O(n) time complexity, O(1) space complexity, and preserves order of other elements 😂 list = [1, 0, 2, 0, 4, 6] zeros = 0 i = 0 while i < len(list): if list[i] == 0: zeros += 1 elif zeros != 0: list[i], list[i-zeros] = list[i-zeros], list[i] i += 1 print(list)
@AxerDeBeastКүн бұрын
if we use brackets the answer is 18. If we do it without bracket the answer is 8.
@ryanranjith672Күн бұрын
# include <stdio.h> int main() { while(1){ int a; printf("Enter any number: "); scanf("%d", &a); if(a > 0){ printf("Positive value "); break; } if((a % -2) == 0) { printf("Negative even "); continue; } printf("%d ",a); } return 0; }
@joshuavanniekerk8842 күн бұрын
This is the best videos!
@AxerDeBeast2 күн бұрын
// is the answer
@ALShareem2 күн бұрын
her smile in start of video and at last oh my god just beautiful
@24CS103Monish2 күн бұрын
the ans is opt C 33 33 🫡
@EdgeLord._hruh2 күн бұрын
#inlude <stdio.h> Int main() { Printf("THanks"); Return 0; }
@Aravindblaze952 күн бұрын
languages = ["Python", "Java", "Swift", "C", "C++"] result =[] for language in languages: if language in ["Swift"]: continue if language in ["C++"]: break result.append(language) print(f"The Output is {result}")
@Aravindblaze952 күн бұрын
The Output is ['Python', 'Java', 'C']
@premkiran13552 күн бұрын
Can we sort the list and. Then we can use reversed method is these correct
@Aravindblaze952 күн бұрын
sum = 0 for numbers in range(1,101): sum = sum + numbers print(sum,"=",end=" ") for number in range (1,100): print(number,"+",end=" ") print("100", end=" ")
Answer for 3:54:31 #include <stdio.h> int* numberMultiply(int* num1, int* num2, int* sum) { *sum = *num1 * *num2; return sum; } int main() { int number1 = 13; int number2 = 9; int sum; int* result = numberMultiply(&number1, &number2, &sum); printf("%d", *result); return 0; }
@ryanranjith6723 күн бұрын
#include <stdio.h> int main() { int a = 0; for (int i = 1; i <= 100; i = i+2) { a = a + i; } printf("%d", a); return 0; }
@keshavaadithya86144 күн бұрын
Option B.3333 Mam
@CodingwithRishabh4 күн бұрын
Nice trick 😊
@MHECRaghavendraprasadHP4 күн бұрын
3333
@Manishsharma-kg2yh4 күн бұрын
#include <stdio.h> int main() { double num1; double num2; printf("Enter the number:"); scanf("%lf", &num1); printf("Enter the number2:"); scanf("%lf", &num2); printf("Result = %.2lf", num1/num2); return 0; }
@Manishsharma-kg2yh4 күн бұрын
#include <stdio.h> int main() { int num1 = 23; int num2 = 24; printf("%d", num1+num2); return 0; }
@user-ny9ux2lu7t4 күн бұрын
#include <stdio.h> int main() { while(1){ int number; printf("enter the number: "); scanf("%d",&number); if(number>0){ printf("it is a positive value"); break; } if(number%2==0){ printf("it is a negative even"); break; } if(number<0){ printf("%d ",number); } } return 0; }
@pradeepkarnam60804 күн бұрын
For 3:26:40 #include <stdio.h> #include<string.h> int main() { char str1[20]; char str2[20]; printf("Enter two strings:"); fgets(str1, sizeof(str1), stdin); fgets(str2, sizeof(str2), stdin); if(strlen(str1) > strlen(str2)) printf("The larger string is %s",str1); else if(strlen(str2) > strlen(str1)) printf("The larger string is %s",str2); else if(strlen(str1) == strlen(str2)) printf("The strings are equal"); return 0; } Is it correct or not
@GautamGskiTec4 күн бұрын
good explanation.
@AishwaryaAishu-yl8ym4 күн бұрын
Answer is jack
@abdirahmaanabdirashiid4 күн бұрын
Madam,how is this, #include <stdio.h> int multiblication(int* num1,int* num2) { int mult =*num1*(*num2); return mult; } int main() { int x,y; printf("ENTER NUM1: "); scanf("%d",&x); printf("ENTER NUM2: "); scanf("%d",&y); int result=multiblication(&x,&y); printf("%d",result); return 0; }
#include <stdio.h> #include <stdbool.h> int main() { int a; do { printf("Enter a number:"); scanf("%d", &a); if (a < 0 && a % 2 != 0) { printf("%d ", a); } else if (a < 0 && a % 2 == 0) { printf("Negative Even "); } else { printf("Positive Value "); } } while (true); return 0; }
@user-iy3po2bq8b4 күн бұрын
C
@clodiaparadise4 күн бұрын
How did d space come between "Hello" "Jack"? 5:43
@Mrjanskie64 күн бұрын
2024 here? 🎉🎉
@SydneyRikoma4 күн бұрын
the answer to the quiz is 3333
@funkyprogrammer29965 күн бұрын
Hello mam ,I am learing c by watching your videos and facing this issue I am writing program to reverse a string... where 'name' is character array printf("%s",x); ---> this does not print anything and in any program this statement is not working #include<stdio.h> #include<string.h> int main(){ char name[20]; printf("enter a name: "); scanf("%s",name); printf("before %s ",name); char temp]; int i =0; int j =strlen(name); printf("j = %d",j); while(i<j){ temp =name[i]; name[i]=name[j]; name[j]=temp; i++; j--; printf("%s ",name); } printf(" %s", name); ⚠⚠⚠⚠//HERE I AM GETTING NO OUTPUT(HERE IS THE PROBLEM) return 0; } Help me
@skullyviper355 күн бұрын
@programizstudios can we use number<8 in switch if yes the break thing is not working plz help how i can use this expression in switch
@callumapps58735 күн бұрын
#include <stdio.h> 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; }