Jump to content
View in the app

A better way to browse. Learn more.

IPS Gizmolord Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted
comment_26691

i expect you have learned what i taught in previous class SO answer this

Q:what will be output when i have this replced in printf

printf("sum=%d",c);

Answer:: Think before you answer what i taught is %d replaces so output would be

sum=40

**************************************************************************************

Forward to todays's class now this aint a calculator indeed so if we want user to input we'll use another function

scanf which will scan what user entered and will take that to complete program//!

#include <stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

C=a+b;

printf("enter first no.=");

scanf("%d", &a);

printf(2nd no.=");

scanf("%d", &B);

printf("Sum=%d",C);

getch();

}

here in program scanf function is used to scan what user entered firstly program will print enter first no.=

than after that we will enter the no. and scanf function will detect what we have entered

you might be asking all fine that % would be repalced by a but why & is used?

Reason:its used to address something in program..!

now it will print 2nd no.= we will enter the no. and it will be replaced by B than it will print C that is mentioned above that c would be equal to a+b..

hence all fine i think..!

REvise practise

i'll be asking questions in next class..!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.