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
1
the output of the following C is Cc
Answered by
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
Physics,
3 months ago
English,
3 months ago
Hindi,
3 months ago
Math,
6 months ago
Math,
6 months ago
Computer Science,
10 months ago
Computer Science,
10 months ago