I have uploaded all my projects in C, C++, HTML, CSS, Java, and Android Development Projects in a topic-wise sequential manner.
Further posts are uploaded on https://mohitx001.blogspot.com/
public class Ch5_21_WhileLoop { public static void main(String[] args) { //Quick Quiz int i = 100; while (i <= 200) { System.out.print(i + " "); i++; } } }
# include <stdio.h> //With argument without return value void mohit ( int n ) { for ( int i = 1 ; i < n ; i ++) { printf ( "%c \n " , '*' ); //without return value } } int main () { mohit ( 5 ); //With argument return 0 ; }
package com.company ; public class Ch7_32_MethodOverloading { static void greet () { // no return type (void) with no parameters System . out . println ( "Hello, Nice to meet you" ); } static void add ( int x , int y ) { // void return with parameter x and y int z = x + y ; System . out . println ( "The addition of " + x + " and " + y + " is: " + z ); } static void func () { System . out . println ( "The function has no value in it." ); } static void func ( int x ) { System . out . println ( "The value in the function is : " + x ); } static void func ( int x , int y ) { System . out . println ( "The value in the function is : " + x + " " + y ); } static void func ( int x , int y , int x1 ) { System . out . println ( "The value in the function is : " + x + " " + y + " " + x1 ); ...
#include <stdio.h> int sum ( int a , int b ) { return a + b ; } void func1 ( int (* fptr )( int , int )) { printf ( "Hello user \n " ); printf ( "The sum of 2 and 2 is %d \n " , fptr ( 2 , 2 )); } void func2 ( int (* fptr )( int , int )) { printf ( "Hello word \n " ); printf ( "The sum of 10 and 2 is%d \n " , fptr ( 10 , 2 )); } int main () { printf ( "The addition of 6 and 4 is:%d \n " , sum ( 6 , 4 )); int (* fptr )( int , int ); //decl...
Comments
Post a Comment