Posts

C program source code to print string length using strlen

C program source code to print string length using strlen
Write a C program  to print  string length using strlen C Program source code#include<stdio.h> #include<conio.h> #include<string.h> int main() { char name[100]; printf("Enter the character:"); gets(name); int k; k=strlen(name); printf("The length of the string is:%d",k); getch(); return 0; }
You can Browse related article below for more information and program code related to string function

 Does above is helpful , Post you views in comment
DO NOT MISS OTHER C PROGRAMMING TUTORIAL* indicates required Email Address *


C program source code to print reversed string

C program source code to print reversed string
Write a C program  to print reversed string C Program source code#include<stdio.h> #include<string.h> #include<conio.h> int main() { char a[100]; int i,n; printf("Enter any word:\n"); gets(a); n=strlen(a); printf("The reversed array is:\n" ); for(i=n-1; i>=0; i--) printf("%c",a[i]); getch(); return 0; }
You can Browse related article below for more information and program code related to recursive function call

 Does above is helpful , Post you views in comment
DO NOT MISS OTHER C PROGRAMMING TUTORIAL* indicates required Email Address *


C program source code to create file in file handling

C program source code to create file in file handling
Write a C program  to create file in file handling C Program source code#include<stdio.h> #include<conio.h> int main() { FILE *fptr; fptr=fopen("Test.txt","w"); if(fptr==NULL) { printf("\nFile can not be opened"); } else { printf("File is succesfully created"); } fputs("welcome to c programming",fptr); fclose(fptr); getch(); return 0; }
You can Browse related article below for more information and program code related to recursive function call

 Does above is helpful , Post you views in comment
DO NOT MISS OTHER C PROGRAMMING TUTORIAL* indicates required Email Address *


c program to sort element of one dimensional array in ascending or descending order

c program to sort element of one dimensional array in ascending or descending order
Write a program  to sort element of one dimensional array in ascending or descending order Ascending #include<stdio.h> #include<conio.h> int main() { int i,j,n,temp,a[1000]; printf("Enter the number of elements in the array:"); scanf("%d",&n); for(i=0; i<n; i++){ printf("Enter the %d elements of array:",i); scanf("%d",&a[i]); } for(i=0; i<n; i++) { for(j = i+1 ; j<n ; j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } printf("The sorted list in ascending order is:"); for(i=0; i<n; i++) printf("%d\n",a[i]); getch(); return 0; } Descending #include<stdio.h> #include<conio.h> int main() { int i,j,n,temp,a[1000]; printf("Enter the number of elements in the array:"); scanf("%d",&n); for(i=0; i<n; i++){ printf("Enter the %d elements of array:",i); s…

c-programming quiz

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming . You will have to read all the given answers and click over the correct answer. You are given 3 to 4 options , you have to click on option  until you are right.
1.Which argument is called actual argument?
Argument used in function prototype and function call

TRY AGAIN
Argument used in only function call

perfect
Argument used in function description

Try again 1.Difference between puts and printf is?
puts print in new line but printf print in same line

WOW , you are write
No difference

Try again
Printf is user defined function but puts is built-in function

Try again

Print pattern in c - number pattern-13

Print pattern in c - number pattern
Write a program to print following pattern12345 4321 123 21 1Program codeint main() { int i,j,k; for(i=5;i>=1;i--) { if(i%2==1) k=1; else k=i; for(j=1;j<=i;j++) { printf("%d",k); if(i%2==1) k++; else k--; } printf("\n"); } return 0; }
You can Browse related article below for more information and program code related to recursive function call

 Does above is helpful , Post you views in comment
DO NOT MISS OTHER C PROGRAMMING TUTORIAL* indicates required Email Address *




Print pattern in c - number pattern-12

Print pattern in c - number pattern
Write a program to print following pattern11111 2222 333 44 5 Program code#include <stdio.h> int main() {     int i, j;     for(i=1;i<=5;i++)     {         for(j=5;j>=i;j--)         {             printf("%d",i);         }         printf("\n");     }     return 0; }
You can Browse related article below for more information and program code related to recursive function call

 Does above is helpful , Post you views in comment
DO NOT MISS OTHER C PROGRAMMING TUTORIAL* indicates required Email Address *