Ads

Friday, August 13, 2021

Extracting substrings using php's strstr()

 You can extract the substring from the corner string using the strstz () function. Two strings are used as arguments for this function: the first string is where you want to find the substring, and the second string is where you want to find it. If this substring is found, the result of this function will be from there to the last part of the string. For example, we can separate the domain part from the below php code for email address:<?...

Saturday, July 24, 2021

Application Software and Types of Programming Languages

 Application software:The main purpose of making a computer is to perform various types of work by reducing human labor. So application program is a tool for different types of work. Such programs can be divided into Suez and package programs. The package program is also referred to as the winning program.The following is a brief introduction to different types of languages: -Lay-level language: Lay-level computer sterile language. Such programs...

Scientists have found a 16,000 years old virus

Scientists have found a 16,000 years old virus in two ice samples from China's Tibetan Plateau. Viruses survive for so many years because they are on ice. The oldest virus is found in this glacier ice and scientists have speculated that viruses have been evolving for centuries. Scientists say that the glacier was slowly formed by a combination of viruses, dust and gas. During ice analysis, they Got  identified the genetic 33 viruses codes . Scientists have already identified four of these viruses. However, at least 27 viruses of them have...

Friday, July 23, 2021

A palindrome is a phrase that reads the same backward as forward, ignoring whitespace and punctuation. For example, “Madam, I’m Adam” and “Are we not drawn onward, we few? Drawn onward to new era?” are palindromes. Write a program that will determine whether a string entered from the keyboard is a palindrome.

 A palindrome is a phrase that reads the same backward as forward, ignoring whitespace and punctuation. For example, “Madam, I’m Adam” and “Are we not drawn onward, we few? Drawn onward to new era?” are palindromes. Write a program that will determine whether a string entered from the keyboard is a palindrome.#include<stdio.h>#include<string.h>#include<ctype.h>int main(){char sentence[1000];char sentence_chars[1000];int j=0,length=0,i;printf("Enter a sentence ");gets(sentence);for(i=0; i<strlen(sentence);...

Write a program that will read a string from the keyboard and display it after removing all spaces and punctuation characters. All operations should usepointers.

 Write a program that will read a string from the keyboard and display it after removing all spaces and punctuation characters. All operations should use pointers.#include<stdio.h>int main(){char s[100];int i,j;printf("Enter a sentence: ");gets(s);for(i=0; i<strlen(s); i++){if(s[i]==' ' || s[i]=='.' || s[i]==',' || s[i]==':' || s[i]==';' || s[i]=='?' || s[i]=='('||s[i]==')'|| s[i]=='['|| s[i]==']'|| s[i]=='"'){for(j=i; j<strlen(s)+1; j++){s[j]=s[j+1];}}}for(i=0; i<strlen(s); i++){if(s[i]==' ' || s[i]=='.' || s[i]==',' || s[i]==':'...

Write a program that will read your personal information such as name, student id, and home district from the keyboard and save it into a filename myinfo.txt. Then write another program to read information from this txt file and display it as output of your program

 Write a program that will read your personal information such as name, student id, and home district from the keyboard and save it into a filename myinfo.txt. Then write another program to read information from this txt file and display it as output of your program.Solution:Type1#include<stdio.h>int main(){FILE *file;char name[30];int id,num,i;char district[15];file=fopen("myinfo.txt","a");if(file==NULL)printf("not");else{printf("File is open \n");printf("Enter of integer number of student \n");scanf("%d",&num);for(i=0; i<num;...

Again Coming Tiktok in India

 Tiktak is coming back to India after being closed for so long. Byte Dance, the maker of TickTock, recently sought approval in the country to launch the TickTock app. TickTock will be launched as soon as the approval is received.In India, a total of 56 Chinese apps, including TickTock, were banned. They were banned because they were dangerous to India's security and discipli...