Design, develop and implement recursively subdivide a tetrahedron to form 3D sierpinski gasket. The number of recursive steps is to be specified by the user

Algorithm:Step 1: Specify the four vertices that form a tetrahedronStep 2: Input the number of subdivisions n.Step 3: Select any three vertices that form one of the triangular faces of…

Continue ReadingDesign, develop and implement recursively subdivide a tetrahedron to form 3D sierpinski gasket. The number of recursive steps is to be specified by the user

C program to copy one string into another string and count the number of characters copied

#include #include void main() { char strng1[50], strng2[50]; int i; printf(“Enter a stringn”); scanf(“%s", strng2); for(i=0; strng2[i]!=’’; i++) strng1[i]=strng2[i]; strng1[i]=’’; printf(“n”); printf(“after copy:%sn”, strng1); printf(“number of charcters copied = %dn”,…

Continue ReadingC program to copy one string into another string and count the number of characters copied

C program to read a series of words from a terminal using scanf function

#include #include void main() { char wrd1[40], wrd2[40], wrd3[40], wrd4[40]; printf(“enter text:”); scanf(“%s”, wrd1); scanf(“%s”, wrd2); scanf(“%s”, wrd3); scanf(“%s”, wrd4); printf(“n”); printf(“word1=%snword2=%sn”, wrd1, wrd2); printf(“word3=%snword4=%sn”, wrd3, wrd4”); } Output: Enter…

Continue ReadingC program to read a series of words from a terminal using scanf function