void main()
{
int i=7;
printf("N= %*d",i,i);
}

Answers were Sorted based on User's Feedback



void main() { int i=7; printf("N= %*d",i,i); }..

Answer / pawanjha12

Its output would be 7,

"%*d"

here * symbol doesn't affect of operation of %d.

so 7 is set to value in variable i.

Is This Answer Correct ?    19 Yes 6 No

void main() { int i=7; printf("N= %*d",i,i); }..

Answer / munir

N= 7
Six space will be left and than 7 will be written..* is kind
of width...so if you put printf("N=$3d,i) than width will be
set as 3.
inshort * is kind used when setting up the width..

Is This Answer Correct ?    8 Yes 5 No

void main() { int i=7; printf("N= %*d",i,i); }..

Answer / vishal bhardwaj

it will display N= 7

Is This Answer Correct ?    1 Yes 1 No

void main() { int i=7; printf("N= %*d",i,i); }..

Answer / sansiri

N= 7




it doesnot consider the * symbol and the other i.

Is This Answer Correct ?    0 Yes 0 No

void main() { int i=7; printf("N= %*d",i,i); }..

Answer / rohit kiran

The Output is:
N=7

Is This Answer Correct ?    2 Yes 3 No

void main() { int i=7; printf("N= %*d",i,i); }..

Answer / sapna

garbage value

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C C++ Errors Interview Questions

void main() { for(int i=0;i<5;i++); printf("%d",i); } What is the output?..

32 Answers   College School Exams Tests, CTS, HCL, iGate, SmartData,


Using string functions write a program that will accept the name of the capital as input value and will display the corresponding country. ------------------------ Capitals Countries ------------------------ Capitals Countries Ottawa Canada Moscow Russia Rome Italy I can't not get it to run properly

1 Answers   AMA,


which typw of errors ? & how to solve it ?

0 Answers  


Display this kind of output on screen. 1 0 1 1 0 1 3. Display this kind of output on screen. 1 1 0 1 0 1 4. Display this kind of output on screen. 1 1 0 1 0 1 5.Display this kind of output on screen. 1 2 3 4 5 6 7 8 9 10

1 Answers  


#include"stdio.h" #include"conio.h" void main() { int a; printf("\n enter a number:"); scanf("%c\n"); getch(); }

12 Answers   HCL,






#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer

10 Answers   Wipro,


2. A student studying Information Technology at Polytechnic of Namibia is examined by coursework and written examination. Both components of assessment carry a maximum of 50 marks. The following rules are used by examiners in order to pass or fail students. a. A student must score a total of 40% or more in order to pass (total = coursework marks + examination marks) b. A total mark of 39% is moderated to 40% c. Each component must be passed with a minimum mark of 20/50. If a student scores a total of 40% or more but does not achieve the minimum mark in either component he/she is given a technical fail of 39% (this mark is not moderated to 40%) d. Grades are awarded on marks that fall into the following categories. Mark 100-70 69-60 59-50 49-40 39-0 Grade A B C D E Write a program to input the marks for both components (coursework marks out of 50 and examination marks out of 50), out put the final mark and grade after any moderation. [30]

0 Answers  


What is the code for following o/p * * * * * * * * * * * * * * * *

1 Answers  


void main() { int i=5,y=3,z=2,ans; clrscr(); printf("%d",++i + --z + i++ + --i * ++y); i=5,y=3,z=2; ans=++i + --z + i++ + --i * ++y; printf("\n%d",ans); getch(); } Its output is 37 and 31.... Please explain me why its different How it works.....

2 Answers  


what is meant by linking error? how can i solve it? if there is a linking error " unable to open file 'cos.obj'? then what should i do?

1 Answers  


WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }

25 Answers   HCL,


wap for bubble sort

3 Answers  


Categories