Code for selenium

Installing Selenium from scratch involves setting up the Java environment, installing the Eclipse IDE, and finally configuring the Selenium libraries. As of 2026, Selenium 4 is the industry standard. Below is the step-by-step guide to get you up and running. Phase 1: Install Java (JDK) Selenium is a Java-based library, so you must have the Java Development Kit (JDK) installed. Download: Go to the Oracle JDK Downloads or Adoptium (OpenJDK). Download the latest LTS version (e.g., JDK 21 or 25). Install: Run the installer and follow the prompts. Set Environment Variables (Windows): Search for "Edit the system environment variables" in your Start menu. Click Environment Variables. Under System Variables, click New and add JAVA_HOME with the path to your JDK folder (e.g., C:\Program Files\Java\jdk-21). Find the Path variable, click Edit, and add %JAVA_HOME%\bin. Verify: Open Command Prompt and type java -version. You should see the version details. Phase 2: Install Eclipse IDE Dow...

What is Constants with Example

 Definition of Constant

constant is a value (for example: 11,20.05,"Hello World",etc.) or a variable whose value is fixed during program execution. To declare a variable as a constant C proviedes a keyword const.

syntax of constant

constant data_type variable_name=value;

Example of constant

const float PRICE=495.75;


  • It is good practice to write the constants in uppercase as shown in Example


Declaration >Explanation
  • const int MAX=1;
  •              read as "MAX is an integer which constant"
  • int const MAX=1;             
  •              read  as"MAX is a  constant integer"



  • Both are valid.

    types of constants

    types of constants
    Various Types  of Constants

    primary Constants

    1. integer Constants in C
    2. Real Constants in C
    3. Character and string constants in C
    4. Backslash character constants in C

    1. integer Constants in C

    Rules for constructing Integer constants

    • An integer constant must have at least one digit .
    • It must not have a decimal point. 
    • It can either be positive or negative.
    • No commas or blanks are allowed within an integer constant. 
    • If no sign precedes an integer constant, it is assumed to be positive.
    • The allowable range for integer constants is -32768 to 32767.
     Example . 

    • 10,-578, 5000, etc. 
    • Here we can use following data types to declare integer constant :




    int, long int, long long int, signed int, unsigned int.

    2. Real constants in C

    Rules for constructing Real constants

    • A real constant must have at least one digit.

    • It must have a decimal point.
    • It could be either positive or negative.
    • If no sign precedes an integer constant, it is assumed to be positive.
    • No commas or blanks are allowed within a real constant.

    Example

    • 10.456789
    • Here we can use following data types to declare real constant:
    float


    3. Character and string constants in C

    Rules for constructing Character constants

    • A character constant is a single alphabet, a single digit
    or a single special symbol enclosed within single quotes.
    • The maximum length of a character constant is 1 character.
    • String constants are enclosed within double quotes.

    Example

    Character Constants: 'Z', 'M', etc.
    String Constants "Kunal", "Hello", etc.

    Here we can use char data type to declare character or string constant.

    4. Backslash character constants in C

    Rules for constructing Backslash constants

    • There are some characters which have special meaning in C language.
    • These characters are preceded by backslash symbol to make use of special function of them.
    • Table is the list of special characters and their purpose.


    Backslash_character

     Meaning

    \b  Backspace
    \f Form feed
    \n Newline
    \r Return
    \t Horizontal tab
    \v Vertical tab
    \\ Backslash
    \' Single quotation mark
    \" Double quotation mark
    \? Question mark
    \0 Null character









    click the link and read this post
    you can join my Telegram group and learn C programming





    Comments

    Popular posts from this blog

    TYBSc IT Semester 6 Information Security Practicals

    ES practical syit sem 4

    Master Linux Practical for B.Sc. IT Semester 5: Download pdf and the Comprehensive Guide

    Java programming practical

    Introduction to computer system

    Advanced Web Designing (AWD) Practical Guide for B.Sc. IT 5th Semester

    CGA practical