Skip to main content

Featured

The STEM Revolution: From Classrooms to Code Camps

  In Nepal, the "STEM Revolution" represents a significant departure from memorization and a move toward experiential, hands-on science, technology, engineering, and math education. This approach recognizes that although traditional classrooms are fundamental, they frequently fail to provide students with the critical thinking and problem-solving abilities that the modern world requires.  It is motivated by a shared understanding that in order for Nepal's youth to prosper in the digital era, they must not only comprehend ideas but also learn how to use them creatively to address pressing issues. Making education relevant and enabling students to be creators of technology rather than merely consumers are the goals of this revolution. Dynamic, unofficial learning settings like maker spaces, robotics clubs, and programming camps are at the core of this movement. These programs, which are frequently run by neighborhood tech companies and non-profits, act as dynamic centers...

Conio.h functions in C language

Introduction 

Whenever we write a program in c language we include conio.h and stdio.h  as this two header files are necessary to make a simple program. The conio in 'conio.h' standards for Console Input Output. It is a non-standard header file used in C and C++. We should use turbo C/C++ to compile and execute conio.h header file function. Here are some common functions that are mostly used.

clrscr()

This function is used to clear the screen. Whenever we want to clear the printed things in screen we use this function.

getch()

This function is used to hold the output screen. If you don't used this function then the output screen will close in fractions of second.

putch()

The function is used to print only single character. For example: 

int main()
{
char a = 'a';
putch(a);
return 0;
}

cprintf()

cprintf() function is used to print output value in the console or output screen as per the format. Here's the way to use it.

int main(void)
{
    char string[50];
    cprintf(“type string value: ”);
    cscanf(“%s”,string);
    cprintf(“typed string value is: %s”, string);
    return 0;
}


cscanf()

This function is used to read input from the output screen or console.  A format specifier is passed to cscanf() function to read input in the required format. Here's the way how we can use it.

int main(void)
{
    char string[50];
    cprintf(“type string value: ”);
    cscanf(“%s”,string);
    cprintf(“typed string value is: %s”, string);
    return 0;
}

textcolor()

textcolor() function is used to change the color or the text. Colors name which can be used are: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE.

Example

int main(void)
{
    clrscr();
    textcolor(GREEN)   
    
    cprintf("This text is in blue color");
    return 0;
}





Comments

Popular Posts