C Programming Solution, Conditional, Looping, Array, Pointer, Structure, File Handling, Linked List Problem Solution in C Language. Specifically Created for Students of Gujarat Technological University (GTU) subject code 2110003.
How to Draw Context Level DFD
-
dfd level 0 types of data flow diagram data flow diagram symbols context
diagram context diagram example with explanation data flow diagram tutorial
pd...
C Program Hello World
Get link
Facebook
X
Pinterest
Email
Other Apps
/*Write a Program to display “Hello World” on the screen.*/ #include <stdio.h> int main(void) { printf("Hello World"); return 0; }
/* Write a program that uses a table of integers whose size will be specified interactively at runtime. */ #include <stdio.h> #include <stdlib.h> int main() { int *p; int n,i; printf("\nEnter the size of table : "); scanf("%d",&n); if((p = (int*)malloc(n *sizeof(int))) == 0) { printf("\n No space available"); exit(1); } else { printf("\n %ld Bytes Space are allocated Successfully", n * sizeof(int)); } for(i=0;i<n;i++) { printf("Enter Value for Position : [%d]",i+1); scanf("%d",(p+i)); } printf("\n Values in Reverse \n "); for(i=n-1;i>=0;i--) ...
/* Write a Program to Find largest odd number from given 1-D Array. */ #include <stdio.h> int main(void) { int a[10],i,n=10,max=0,j=0; for(i=0;i<n;i++) { printf("Enter Value at a[%d] : ",i); scanf("%d",&a[i]); if(a[i]%2==1) { if(j==0) { max=a[i]; j++; } else { if(max<a[i]) { max=a[i]; } } } } if(j==0) { printf("There is no Odd Value in Array"); } else { printf(" Largest Odd value in Array is : %d",max); } return 0; }
/* Write a program to store a character string in a block of memory space created by malloc and then modify the same to store a large string. */ #include <stdio.h> #include <stdlib.h> int main(void) { char *ch; int n,n1; printf("\n Enter Size of String you Want : "); scanf("%d",&n); if((ch = (char *)malloc(n *sizeof(char))) == 0) { printf("\n No space available"); exit(1); } else { printf("\n %ld Bytes Space are allocated Successfully", n * sizeof(char)); } printf("\nEnter String :"); scanf("%s",ch); printf("\n String is : %s",ch); printf("\n Enter Size You Want Increase: "); scanf("%d",&n1); if((c...
Comments
Post a Comment