Posts

PRINTING THE ALPHABET - J IN C LANGUAGE

 #include<stdio.h> #include<conio.h> // printing - J int main() {     int i,j,l=9;     for(i=1;i<=l;i++)     {         for(j=1;j<=l;j++)         {          (i==1||j==5||i==9&&j<=5||j==1&&i>5)?printf("*"):printf(" ");                                }         printf("\n");     } }

PRINTING THE ALPHABET - G IN C LANGUAGE

  #include<stdio.h> #include<conio.h> //G int main() {     int i,j,l=9;     for(i=1;i<=l;i++)     {         for(j=1;j<=l;j++)         {          (i==1||j==1||i==9||i>=5&&j==9||i==5&&j>5||j==5&&i>=5&&i<7)?printf("*"):printf(" ");                                }         printf("\n");     } }

TALK IN CLASS AND QUIZ IN CPP BY PRADEEP

 #include<iostream> #include<conio.h> using namespace std; class talk {     char name[15],name1[20],y;     int a;     public:         void dis1();         void dis2();         void dis3(); }; void talk:: dis1() {     cout<<"Hello! how are your"<<endl;     cin>>name; } void talk::dis2() {     cout<<"Ohh! nice can you tell me what's your name"<<endl;     cin>>name1; } void talk::dis3() { cout<<name1<<" you are best person in the world! \n would you like to play a Quiz reply only y or n"<<endl; cin>>y; switch (y) { case 'y':     cout<<"Ok the Quiz is started\nA.What is a correct syntax to output Hello World in C++?\n1.printf(""Hello world"")\n2.cout<<""Hello world"""<<endl;     cout<<"(note:- reply only 1 or 2)"<<endl;     cin...

POINTERS IN C LANGUAGE

 #include <stdio.h> using namespace std;    int main() {  int a;    printf(" Enter the value of a \n");    scanf("%d",&a);    int*b = &a;    printf("The value of a is %d\n",a);    printf("The value of a is %d\n",*b);    printf("The address of a is %u\n",&a);    printf("The address of a is %u", b);    }

TRIANGLE USING LOOP AND IF CONDTIONS IN C NESTE LOOP

    #include <stdio.h> int main() {     int i,j,l=9,p=5,q=5;     for(i=1;i<=l;i++)     {         for(j=1;j<=l;j++)         (i==5||j==p||j==q)?printf("*"):printf(" ");         p++,q--;      printf("\n");        }     return 0; }

PRINTING THE U ALPHABET USING C LANGUAGE

 #include <stdio.h> #include<conio.h> using namespace std;  // printing the U symbol; int main(){   int i,j,l=9; for( i=1; i<=l; i++){  for(j=1; j<=l; j++){ if(   j==1||i==9 ||j==9) printf("*");   else  printf(" ");  }  printf("\n"); }return 0; }

PRITING THE T ALPHABET IN C LANGUAGE

 #include <stdio.h> #include<conio.h> using namespace std;  // printing the T symbol; int main(){   int i,j,l=9; for( i=1; i<=l; i++){  for(j=1; j<=l; j++){ if(   j==5||i==1 ) printf("*");   else  printf(" ");  }  printf("\n"); }return 0; }