Computer Science, asked by aishwaryad333, 6 months ago

What is the output of the following C
#include diostream>
using namespace std;
template <typename T, int count>
void foo(TX)
{
I val[count]:
for (int i = 0; i < count; i++) {
val[1] X**,
cout << val[i] << " ";
3
B
int main()
{
float y = 2.1;
foo<float, 3>(y):​

Answers

Answered by jatinkumar94165
1

the output of the following C is Cc

Answered by vaibhavgood9
0

Answer:

The answer would be 2.1` 3.1 4.1

Explanation:

Since Ques is not written properly , I'll give you exact question

#include <iostream>

using namespace std;

template <typename T, int count>

void foo(T X)

{

T val[count];

for (int i = 0; i < count; i++) {

val[i]= X++;

cout << val[i] << " ";

}

};

int main()

{

float y = 2.1;

foo<float, 3>(y);

}

Similar questions