Friday, February 11, 2022

difference between getch and getche

 
For video lectures please visit and subscribe the channel
https://youtu.be/dq6vEoGCkoI

Whatsup group
https://chat.whatsapp.com/LbV9FNen1eT5C2VDhThFOe



getch()

The word getch stands for get character, The getch function is used to input a single character from the user. When the functions are executed, it waits for any key to be pressed. The character entered by the user is not displayed on the screen

The function getch() is defined in the header file conio.h therefore the header file must be included in the program to sue this function.

Syntax:

Method-1:

getch();

This is normally used in a program to stop the execution of the program temporarily.

Method-2:

variable= getch();

It takes any character from the keyboard and stores that character in the variable 

 

 

getche():

The word getche() stands for get character. The letter e in getche stands for echo. the () function is used to input a single character from the user. When this function is executed, it waits for any key to be pressed. The function echos (display) the character on the screen entered by the user.

Syntax:

variable= getche();

__________________________________________________________________________ 

gets () function:

 The gets function is used to input string values from the user. The input is stored in a string variable. The user can enter any type of letter including alphabets, digits, special symbols, and spaces. After typing the string from the keyboard, the user presses ENTER key and the string is stored in the variable. The null characters \0 are automatically entered at the end of the string.

Syntax:

gets(variable);



Wednesday, February 9, 2022

Notes of Chapter-2 Class 10 Computer Science 
Notes of User Interaction of class 10 Punjab Curriculum and Textbook Board, Lahore
This note contains all theory, unsolved Activities, exercise Questions, and coding 

Click the below link to  download
https://drive.google.com/file/d/1amZzyIK-12CeLoFD5pb8ce5jmfWFPYE5/view?usp=sharing 

  1. printf()
  2. scanf()
  3. formate specifer
  4. getch()
  5. Difference between getch() and scanf()
  6. Statement Terminator
  7. Escape Sequence
  8. Assignments operators
  9. Relational operators
  10. Difference between = and==
  11. Logical Operators
  12. Unary Vs Binary
  13. Operators Precedence 


Follow this link to join my WhatsApp group: https://chat.whatsapp.com/LbV9FNen1eT5C2VDhThFOe



Sunday, January 30, 2022

Basic Input Function – scanf in C programming (Class 10 Computer notes)

SCANF():

The scanf function is used to get input from the user. The input is stored in a variable in a specified format.

Syntax:

The syntax of scanf function is as follows

scanf (format string, &variable1, &variable2, &variable3);

 Format String: The format string is given in double quotes It may consist of different format Specifiers that indicate the format according to which values will be entered.

Variables:  The variables are used to store the value entered by the user through the keyboard. Each variable refers to a memory location. The symbol & indicates the memory location of the variable in which the input is stored It is called the address operator Getting Single Input.

Examples:

Getting single input:

scanf (“%d”, &a);

The above statement is used to get integers input. The value entered by the user will be stored in variable “a”.



Getting Multiple input:

Scanf function can be used to input many values at the same time as follows;

scanf(“%d %d ,&a, &b);

The above statement will get two inputs in a and b respectively. It is also possible to get different types of input in the same function as follows

scanf (“%d %f”, &a, &b);

The scanf function is normally used in combination with printf function. The purpose of using printf function before scanf is to tell the user that the computer is waiting for input.

Example:

printf(“ Enter your marks”);

scanf(“%d” ,&a);



Friday, January 21, 2022

Basic Output Function – printf in C programming (Class 10 Computer notes)

 Define: The printf() function is used to display output on the screen. It is defined in stdio.h (header file) in C library.

syntax:  printf( "format string", argument list);

Explanation: Format string is also known as control string. It may consist of the following 

Text:  Any message to display on the screen.

E.g:    printf( " This is the message");



Format specifier: Specify how the values of variables will be displayed.



Escape sequence: Specify the format of the output. It always starts with backslash "\".

















Which Field to Choose after Inter

انٹرمیڈیٹ_کے_طلباء_و_طالبات_متوجہ_ہوں۔... یہ پوسٹ آپ کے مستقبل سے متعلق ہے۔ عام طور پر میڈیکل کے طلبہ سمجھتے ہیں کہ میڈیکل میں ایم بی بی ایس...