Ads

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 are written using binary numbers and other coding methods. This language is made up of binary numbers such as 0 and 1. Lay-level languages ​​cannot be written with normal numbers or letters. The computer can read and understand it directly. This is difficult for language programmers to understand. However, it is very easy for the computer to understand. In the first generation computers, all the villages were written in this binary based machine language only. Since computers can only understand low level machine language. So in high-level language. Written programs have to be converted to low-level languages ​​using separate software.

Assembly Language: Assembly languages ​​or symbol languages ​​were introduced in the fifties to overcome the limitations of machine languages. These languages ​​are being used in second generation computers. In this language, letter symbols are used instead of binary numbers. This command class, made up of character symbols, must first be input into the computer. Later, when they are used to write programs, they are again converted to machine language on the computer.

High-Level Language: The global effort to simplify the way computer is directed has brought this language much closer to human language. In the language we speak, computer programming language has been created to be a language close to what people speak. Such a programming language is called high-level language. To write a program in a high-level language, the programmer does not need to have an idea about binary code. Programmers can compose programs without binary knowledge.


Below are a few high-level languages. 1. Clotran, 2. Kobal, 3. Basic, 4. Visual Basic 5. Pascal, 6, C or C ++, 7, Java etc.

However, programs written in high-level language cannot be understood directly by the computer. This program is converted into machine language by computer translator program. The computer can understand such a program only after converting it into a machine language.

Computers use programs called assemblers, compilers, or interpreters to convert high-level programs into machine languages.

High-level languages can be further subdivided into: -

a.Third Generation Language.

b.Fourth Generation Language.

c.Object Oriented Language.

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 not yet been identified. This virus Genes have a property that helps them infect cells in a cold environment. During division, viruses not share common, universal genes , so that's why new type of viruses are being created here.

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); i++)

if(isalpha(sentence[i]))

sentence_chars[j++]=tolower(sentence[i]);

sentence_chars[j]='\0';

length=strlen(sentence_chars);


for(i=0; i<length/2; i++)

if(sentence_chars[i]!=sentence_chars[length-1-i])

break;


if(i==length/2)

printf("palindrome");

else

printf("not palindrome");

}

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]==':' || 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];

}


}

}

printf("\nsol:\n%s",s);


}

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; i++)

{

printf("Enter student name\n");

scanf("%s",&name);

printf("Enter student ID\n");

scanf("%d",&id);

printf("Enter student district\n");

scanf("%s",&district);

fprintf(file,"%s\t\t%d\t\t%s\n",name,id,district);

}

fclose(file);

}

}



Solution type2 :

#include<stdio.h>

int main()

{

FILE *file;

char ch;

file=fopen("myinfo.txt","r");

if(file==NULL)

printf("not");

else

{

printf("File is open \n");

while(!feof(file))

{

ch=fgetc(file);

printf("%c",ch);


}

fclose(file);

}


}

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 discipline.