C Program Pointer Example How to write a C Program Pointer Example in C Programming Language ? Solution For C Program :
C Program To Reverse The String Using Pointer How to write a C Program To Reverse The String Using Pointer in C Programming Language ? Solution For C Program : /*C Program To Reverse The String Using Pointer.*/ #include<stdio.h> #include<conio.h> void reverse(char *); void main() { clrscr(); char st[10]; gets(st); printf("reverse="); reverse(st); printf("\noriginal data=%s",st); getch(); } void reverse(char *s) { char c; if (*s==NULL) { return; } c=*s; s++; reverse(s); printf("%c",c); } You may also learn these C Program/Code : C Program To Swap Two Numbers Without Using Third Variable C Program To Understand Use Of Pointers In MATRIX C Program To Write Data In A File And Search Data From File C Program Concatenating Two Strings Into A Third System C Program To Copy One Character Array Into Another C Program To Generating Fibonacci Series Using Recursion C Program To Convert Decimal To Binary Using Recursion C Program to Calculate GCD using recursion C Program To Calculate First Numbers Using Recursion C Program Finding the sum of Squares using Recursion C Program to Find NCR Of A Given Number Program C Program To Check The Given Value Is Vowel C Program To Find Maximum Of Given Numbers C Program To Convert Temperature In Celsius To Fahrenheit, Using Function C Program To Convert Temperature Into Celsius C Program To Find Simple Interest C Program To Find Week Day Of A Given Date C Program To Find The Average Of n Numbers C Program To Display The Number In A Specific Formats C Program To Generate Multiplication Table C Program to Count Number of Lines in Input until Interrupted by CTRL + Z C Program To Print Text Into Uppercase C Program To Reverse A Given Number C Program to Find Factors Of A Given Number C Program To Find GCD Of Two Non-Negetive Numbers C Program to Find The Product Of Two Numbers Without Multiplication Operator C Program to Find Factorial Number C Program to Print ASCII equivalent of a character until terminated by key is ‘x’ C Program Date from string DDDD-DD-DD C Program to Swap two variables without using third variable C Program To Multiply Two Matrices C Program To Print Alphabets Like {Aa Bb Cc...} C Program To Print Alphabets Like {Az By Cx...} C Program To Print Lines Of A Paragraph Having More Than 15 Characters C Program To Print Prime Numbers Upto The Number You Want C Program To Print String In Formatted Output Form C Program To Print Sum Of n Digit Number C Program To Print Table Horizontally C Program To Print Tridiagonal Matrix C Program To Reverse A Number C Program To Reverse The String Using Pointer C Program To Search A Number Inside The Array C Program To Sort An Array In Ascending And Descending Order C Program To Sort An Array Of Names In Alphabetical And Reverse Order C Program To Store Students Record In A Text File C Program To Store Students Record Using Structure
C Program to Find max and min in array using pointer concept How to write a C Program to Find max and min in array using pointer concept in C Programming Language ? This C Program to Find maximum and minimum in array using pointer concept. Solution: /*C Program to find maximum and minimum element in array using pointer */ #include <stdio.h> #include <stdlib.h> void max_min(int num[],int length,int *max,int *min); int main() { int len; int num[len]; int i,max,min; printf("How many numbers do you wanna input ?"); scanf("%d",&len); printf("Enter %d numbers to find the biggest and small (enter x to terminate)",len); for(i=0;i<len-1;i++) { scanf("%d",&num[i]); } max_min(num,len,&max,&min); printf("Biggest number :%d",max); printf("Smallest number :%d",min); system("pause"); return 0; } void max_min(int num[],int length,int *max,int *min) { int k; for(k=0;k<length-1;k++) { if(num[k]>*max) *max=num[k]; else if(num[k]<*min) *min=num[k]; } }
C Program to Adds literal to list of literals How to write a C Program to Adds literal to list of literals in C Programming Language ? Adds literal to list of literals. Param token Token which contains literal value. Return Pointer to the list of literals on current literal. /** * * Adds literal to list of literals. * * \param token Token which contains literal value. * * \return Pointer to the list of literals on current literal. * */ static void* add_literal(token_t* token) { void* literal; if (token -> lexeme == T_DOUBLE) literal = get_literal_double(literals, token -> value -> double_value); else if (token -> lexeme == T_INT) literal = get_literal_int(literals, token -> value -> int_value); else if (token -> lexeme == T_STRING) literal = get_literal_string(literals, &token -> value -> string_value); else return NULL; }