strupr and strlwr Get link Facebook X Pinterest Email Other Apps October 14, 2020 #include <stdio.h>#include <string.h>int main(){ char c []= "rohit parmar12#\n";strupr(c);printf("%s", c);char d [] = "VISHAL PARMAR";strlwr(d);printf("%s", d);return 0;} Get link Facebook X Pinterest Email Other Apps Comments
Right angle triangle pattern October 31, 2020 #include <stdio.h> int main () { int num, row , columb; printf("Enter the number of row : "); scanf("%d", &num); for (row = 1 ; row <= num; row++){ for (columb =1 ; columb <= row; columb++){ printf("*"); } printf("\n"); } return 0 ;} Read more
Pass an array of pointer in function October 03, 2020 #include <stdio.h> void display (int *[] , int ); int main() {int a = 100, b=200, c=300; int *x[3]; x[0] =&a; x[1] = &b; x[2] = &c; display(x , 3); return 0; } void display ( int *x[] , int num){ int counter ; for(counter=0 ; counter<num ; counter++){ printf("%p ------> %d\n" , x[counter] , *(x[counter])); } } Read more
Pointer to function October 03, 2020 #include <stdio.h> void display (int , char); int main() { void (*p)(int , char); int a = 12; char b= 'R'; p = display; printf("address of display fuction is %p\n" , p); (*p)(a, b); return 0; } void display (int a , char b){ printf ("a = %d , b= %c\n" , a, b); printf("welcome to c programming\n"); } Read more
Comments
Post a Comment