Skip to main content

Posts

C PROGRAM TO ENTER THE DETAILS OF AN EMPLOYEES AND DISPLAY OUTPUT

    C PROGRAM TO ENTER THE DETAILS OF AN EMPLOYEES AND DISPLAY OUTPUT include <stdio.h> struct employee {     char name1[100], name2[100];     int age, id;     float salary; }; struct employee e; int enterDetails() {     printf("Enter FIRST NAME of an employee:\n");     scanf("%s", &e.name1);     printf("Enter LAST NAME of an employee:\n");     scanf("%s", &e.name2);     printf("Enter AGE of an employee:\n");     scanf("%d", &e.age);     printf("Enter ID of an employee:\n");     scanf("%d", &e.id);     printf("Enter SALARY of an employee:\n");     scanf("%f", &e.salary);     return 0; } void details() {     printf("\n***** DETAILS OF AN EMPLOYEE ARE *****\n");     printf("NAME: %s %s\n", e.name1, e.name2);     printf("ID: %d \nAGE: %d\n", e.id, e.age);     printf("SALARY: %f...
Recent posts

C PROGRAM TO CALCULATE NUMBER OF VOWELS, DIGITS, CONSONANTS, SPECIAL CHARACTERS AND SPACES BETWEEN THE STRING IN AN ENTERED STRING

C PROGRAM TO CALCULATE NUMBER OF VOWELS, DIGITS, CONSONANTS, SPECIAL CHARACTERS AND  SPACES BETWEEN THE STRING IN AN ENTERED STRING #include <stdio.h> #include <string.h> int main() {     char str[100];     int i, leng, v = 0, c = 0, w = 0, d = 0, s = 0;     printf("Enter String:\n");     gets(str);     leng = strlen(str);     for (i = 0; i < leng; i++)     {         if (str[i] == 'a' || str[i] == 'e' || str[i] == 'i' ||             str[i] == 'o' || str[i] == 'u' ||             str[i] == 'A' || str[i] == 'E' || str[i] == 'I' ||             str[i] == 'O' || str[i] == 'U')         {             v++;         }         else if (str[i] >= 'a' && str[i] <= 'z' ||         ...

C PROGRAM FOR VOTING SYSTEM OR ELECTION SYSTEM

 C PROGRAM FOR VOTING SYSTEM OR ELECTION SYSTEM  #include <stdio.h> #define CANDIDATE_COUNT #define CANDIDATE1 "Shivam Mishra" #define CANDIDATE2 "Nitesh Mishra" #define CANDIDATE3 "Rishab Mishra" #define CANDIDATE4 "Shivansh Mishra" int votesCount1 = 0, votesCount2 = 0, votesCount3 = 0, votesCount4 = 0, spoiledtvotes = 0; int castVote() {     int choice;     printf("\n\n ### Please choose your CANDIDATE ####\n\n");     printf("\n 1. %s", CANDIDATE1);     printf("\n 2. %s", CANDIDATE2);     printf("\n 3. %s", CANDIDATE3);     printf("\n 4. %s", CANDIDATE4);     printf("\n 5. %s", "None of These");     printf("\n\nENTER YOUR CHOICE (1 - 4) :\n ");     scanf("%d", &choice);     switch (choice)     {     case 1:         votesCount1++;         break;     case 2:         votesCount2++;...

C PROGRAM TO SWAP TWO NUMBERS BY USING CALL BY REFERENCE

 C PROGRAM TO SWAP TWO NUMBERS BY USING CALL BY REFERENCE  #include <stdio.h> int swap (int *, int *); int main() {     int a, b;     printf("\nEnter Two Values:\n");     scanf("%d %d", &a, &b);     printf("Before Swapping:\n");     printf("a = %d\nb = %d\n", a, b);     swap(&a, &b);     printf("After Swapping:\n");     printf("a = %d\nb = %d", a, b);     return 0; } int swap (int *x, int *y) {     int temp;     temp = *x;     *x = *y;     *y = temp; } //OUTPUT Enter Two Values: 3 14 Before Swapping: a = 3 b = 14 After Swapping: a = 14 b = 3 Enter Two Values: 200 900 Before Swapping: a = 200 b = 900 After Swapping: a = 900 b = 200

C PROGRAM TO FIND L.C.M OF TWO NUMBERS ENTERED BY AN USER

  C PROGRAM TO FIND L.C.M OF TWO NUMBERS ENTERED BY AN USER   #include <stdio.h> int main() {   int a, b, temp1, temp2;   printf("ENTER TWO NUMBERS:\n");   scanf("%d%d", &a, &b);   temp1 = a;   temp2 = b;   while (temp1 != temp2)   {     if (temp1 > temp2)       temp1 = temp1 - temp2;     else       temp2 = temp2 - temp1;   }   printf("L.C.M OF ENTERED TWO NUMBERS IS:\n%d", (a * b) / temp1);   return 0; } //OUTPUT ENTER TWO NUMBERS: 5 8 L.C.M OF ENTERED TWO NUMBERS IS: 40 ENTER TWO NUMBERS: 9 4 L.C.M OF ENTERED TWO NUMBERS IS: 36 ENTER TWO NUMBERS: 7 10 L.C.M OF ENTERED TWO NUMBERS IS: 70

MATHS

Ques:         Ans:    

Necessity:- A College Degree

Necessity:- A College Degree                   Your education is the single greatest gift you can give yourself. While there are educational opportunities all around us, some of them come at a greater cost than others. A college education might require a hefty investment of time and money upfront but the pay off is much better over time than if you used your life experiences in order to achieve the same level of education that you can pack into 2, 4, or 5 years of an undergraduate education on the college level. In other words, over the course of your lifetime you are likely to pay far less for your college education than you would pay (in earning potential) for not having a college education. At the same time, each level of college education you receive increases your overall earning potential. This means that a one-year degree in a technical field will pro vide a modest boost from a high school diploma when it comes to earning potential but...