Questions tagged as 'printf'

2
answers

Can I replace cout and printf? [duplicate]

What is the difference between cout and printf ? I learned using printf and scanf , but in an online course I see the teacher using cout and some pages also use cout , but others use printf ......
asked by 16.12.2017 / 00:45
1
answer

Problems in String and Case

I'm a newcomer to programming recently and I have a college assignment where I have to create a registration system that receives input from customer data and then another option that prints the information on the screen. / p> But I'm having t...
asked by 22.10.2017 / 22:25
1
answer

How to print step by step

I have the following program that does the following, you insert the rules (V, T, P, S), through 1 file and then you enter the word (GLUD) to see if it is part or n of the language that is in the rule, and there the program returns a Yes or a No...
asked by 30.09.2017 / 01:51
3
answers

What are the differences between printf, fprintf, sprintf, snprintf, printf_s and fprintf_s?

Searching I noticed that there are several variations of printf , but I did not understand the differences and which to use in certain circumstances. I would like to know the purpose of each with their differences and how they can be us...
asked by 04.09.2016 / 05:56
0
answers

Print Iframe

I'm trying to print an iframe that I have on a page on my site, but the print window is not opening when I use the following code: function printFunction() { window.frames["printf"].focus(); window.frames["printf"].print(); } <i...
asked by 01.06.2015 / 13:40
3
answers

C program "eating" characters when executed

Next, All IDEs I program in C are outputting with characters less than each iteration. For example, when executing a for, at each iteration one or more characters are added: NotethatinbothnetbeansandDevC++,thesameerroroccurs.Ithinkit'ssomet...
asked by 03.02.2017 / 23:50
2
answers

Stopped running when I added printf

I made a source code in C, conditional, but when I add a function printf windows reports that the program stopped running. See the code: 1 : link NOTE: I USE WINDOWS 7 HOME BASIC, AND MY EDITOR AND COMPILER IS DEVC ++, IF THAT INTERFERE IN...
asked by 16.03.2016 / 14:52
2
answers

Change a text value through pointer in C

I need to change the values of the variables through their pointers but I can not. #include <stdio.h> #include <stdlib.h> //Programa principal int main() {//Declaração de variáveis e ponteiros int x = 0; int*p; float y = 0...
asked by 26.11.2018 / 16:43
1
answer

Change number of digits after the comma depending on the situation [duplicate]

I know I can get a digit bound after the comma with %.2f to float and %.2lf to double . How can I change this limit depending on the occasion? For example: Get a two-digit limit with float that would...
asked by 09.07.2017 / 03:54
1
answer

How to make the program stop in each printf?

I would like to make the user type printf() at a time, being "Name, RG and Email" but as soon as I type the name, it executes everything else and ends the program, how do I stop it in the next printf() for the user? int main () {...
asked by 22.10.2018 / 00:02