Posts

Showing posts from June, 2020

String Programming set on java, kotlin, python, c and c++

Hey there! Here, you would find practice sets for string input output questions and their solutions that are solved in 5 different programming languages c , c++ , java , kotlin, and python . All programs have been tested. Program develop tools VS code - text editor Linux - operating system java 11 kotlin 1.7.32 python 3.7 g++ for c and c++ you can find all code at github click here What should you know before start what is string if else statement for each loop for java loop, nested loop 1 Input your name and print on console. Solution input : Enter your name: sagar output : ...

String input in c (with example)

A string is an array of characters in c, the string is written under the double quotes only. Even though any numeric or single alphabetical character written under the double quotes, all are considered as a string. Example: char str[] = "programz1000" These are three methods for getting input from the user:- scanf() -> We can input string by two ways with scanf() method: Syntex: scanf("%s",string) Example: #include<stdio.h> int main(){ char str[20]; scanf("%s",str); printf("%s",str); return 0; } Input: Programz rocks Output: Porgramz Note: In this program, It doesn't accept string after first space ...

Pattern Programming in c c++ java kotlin and python

Pattern Programming Here, you would find practice sets for some basic questions and there solutions that are solved in 5 different programming languages c , c++ , java , kotlin and python . All programs have been tested. Program develop tools VS code - text editor Linux - operating system java 11 kotlin CLI python 3.7 g++ for c and c++ Practicle 1 Pattern program 1 Solution output : * ** *** **** ***** c c++ Java Kotlin Python ...