string length without stdlib in c

Calculating String Length Without Standard Library in C:

#include <stdio.h>

int main() {
    char a[] = "Google.com";
    int i = 0;

    // Loop until null terminator is encountered
    while (a[i] != '\0')
        i++;

    printf("The string length is %d.", i);
    return 0;
}

Output:

The string length is 10.

In this C program, we manually calculate the length of the string without using any standard library functions. We iterate through the character array until we encounter the null terminator ('\0'), which marks the end of the string. We then print the length of the string based on the number of iterations.

If you have any further questions or need additional assistance, feel free to ask!

c program to convert meter to inches

 Program to convert measure meter to inches


  #include <stdio.h="">
int main () {
int i=8;
//1m= 39.3701inches
printf("%f",(39.3701*i));
return 0;
}

above c program just convert meters into inches.we know that 1m= 39.3701inches hence the i value gets multiped by 39.3701 to get value in meters

free books online pdf


Say yes now we can find free books now online 🙂below are the links for free online ebooks or pdf  available online.
These are 25  top website
  1. Free tech books.com
  2. Bookspics.com
  3. Librivox.com
  4. Planet publish .com
  5. Free-Ebooks.com
  6. Free tech books .com
  7. Online books.library.upper.edu
  8. Loyalbooks.com
  9. Wikibooks.com
  10. Free tech books 
  11. Gitbook.com
  12. Open library
  13. Google books
  14. Knowfree.tradepub.com
  15. Read.amazon.com
  16. Feedbooks.com
  17. Goodread.com
  18. Baen.com
  19. Ebooks.adelade.com

Split string into key-value pairs using C++

This is a small post  how to get key value pairs form a string which out any using any libraries 

if the string is 


string s ="key1:value1,key2:value2,key3:value3,

this is a string which we should parse where key value are seperated with ':' and key value pairs are seperated with ','.

#include<iostream>
#include <cstring>
#include <unordered_map>

using namespace std;
int main(int arg,char**argv){
	 string s="key1:value1,key2:value2,key3:value3,";

	 unordered_map<string,string>kv ;

	 bool k=0;
	 string key,value;
	 for (int i=0;i<s.length();i++){ 
		 if (s.at(i)==':')
			 k=1;
		 else if(s.at(i)==','){
			 kv[key] = value;
			 key="";value="";k=0;}
		 else if (k==0)
			key+=s[i];
		else
			 value+=s[i];
		 }
         cout<<kv["key1"]<<'\n'<<endl;
return 0;
}

form the above program Your can clearly see that the program will parse the string and place the values in an unordered_map class which is speed made with hashTable internally.Advantages of using a unordered_map is that it is very fast and we can store,access,find,erase the key and value pairs easily

the above program will output value1.Because we are trying to access the value for the key1